コード例 #1
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithBlankValue() {
    final String value = BLANK;

    LOGGER.entering(this.getClass().getName(), "testIsNotValidIrideIdentityWithBlankValue", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithBlankValue");
    }
  }
コード例 #2
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMacBlank() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/" + BLANK;

    LOGGER.entering(this.getClass().getName(), "testIsNotValidIrideIdentityWithMacBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithMacBlank");
    }
  }
コード例 #3
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsValidIrideIdentity() {
    final String value =
        "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(this.getClass().getName(), "testIsValidIrideIdentity", value);
    try {
      final boolean result = IrideSecurityUtils.isValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsValidIrideIdentity");
    }
  }
コード例 #4
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMissingNomeToken() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithMissingNomeToken", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithMissingNomeToken");
    }
  }
コード例 #5
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithUnrecognizedValue() {
    final String value = "UNRECOGNIZED_VALUE";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithUnrecognizedValue", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithUnrecognizedValue");
    }
  }
コード例 #6
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsValidIrideIdentityWithComplexMacToken() {
    final String value =
        "AAAAAA00A11D000L/CSI PIEMONTE/DEMO 23/IPA/20150223095441/2//VZjBdhZTwU+/7AUMNSHjQ==";

    LOGGER.entering(
        this.getClass().getName(), "testIsValidIrideIdentityWithComplexMacToken", value);
    try {
      final boolean result = IrideSecurityUtils.isValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsValidIrideIdentityWithComplexMacToken");
    }
  }
コード例 #7
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithAllEmptyTokens() {
    final String value =
        EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY + "/" + EMPTY;

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithAllEmptyTokens", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithAllEmptyTokens");
    }
  }
コード例 #8
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithTimestampBlank() {
    final String value =
        "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/" + BLANK + "/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithTimestampBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(this.getClass().getName(), "testIsNotValidIrideIdentityWithTimestampBlank");
    }
  }
コード例 #9
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsValidIrideIdentityWithRealisticDigitalIdentity() {
    final String value =
        "NNRLSN69P26L570X/Aldesino/Innerkofler/IPA/20160531113948/2//VZjBdhZTwU+/7AU0A8HjQ==";

    LOGGER.entering(
        this.getClass().getName(), "testIsValidIrideIdentityWithRealisticDigitalIdentity", value);
    try {
      final boolean result = IrideSecurityUtils.isValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(), "testIsValidIrideIdentityWithRealisticDigitalIdentity");
    }
  }
コード例 #10
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithCodiceFiscaleBlank() {
    final String value =
        BLANK + "/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(), "testIsNotValidIrideIdentityWithCodiceFiscaleBlank", value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(), "testIsNotValidIrideIdentityWithCodiceFiscaleBlank");
    }
  }
コード例 #11
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken() {
    final String value = "AAAAAA00B77B000F/CSI PIEMONTE/DEMO 20/IPA/20160531113948/2";

    LOGGER.entering(
        this.getClass().getName(),
        "testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken",
        value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(),
          "testIsNotValidIrideIdentityWithMissingLivelloAutenticazioneToken");
    }
  }
コード例 #12
0
  /**
   * Test method for {@link
   * org.geoserver.security.iride.util.IrideSecurityUtils#isNotValidIrideIdentity(java.lang.String)}.
   */
  @Test
  public void testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty() {
    final String value =
        "AAAAAA00011D000L/" + EMPTY + "/DEMO 20/IPA/20160531113948/2/1IQssTaf4vNMa66qU52m7g==";

    LOGGER.entering(
        this.getClass().getName(),
        "testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty",
        value);
    try {
      final boolean result = IrideSecurityUtils.isNotValidIrideIdentity(value);

      assertThat(result, is(true));
    } finally {
      LOGGER.exiting(
          this.getClass().getName(),
          "testIsNotValidIrideIdentityWithCodiceFiscaleWithInvalidFormatAndWithNomeEmpty");
    }
  }