Interface SamlRequestIdManager


public interface SamlRequestIdManager
An interface which generates and validates a request ID when transferring a SAML message between a service provider and an identity provider.
  • Method Details

    • ofJwt

      static SamlRequestIdManager ofJwt​(String issuer, Algorithm algorithm, int validSeconds, int leewaySeconds)
      Returns a SamlRequestIdManager implementation based on JSON Web Tokens specification.
      Parameters:
      issuer - the ID of the entity who issues a token
      algorithm - the algorithm instance which is used to create a signature
      validSeconds - the valid period of a token in seconds
      leewaySeconds - the leeway when there is a clock skew times between the signer and the verifier, in seconds.
    • ofJwt

      static SamlRequestIdManager ofJwt​(String issuer, String secret, int validSeconds, int leewaySeconds) throws UnsupportedEncodingException
      Returns a SamlRequestIdManager implementation based on JSON Web Tokens specification with the Algorithm instance using HmacSHA384.
      Parameters:
      issuer - the ID of the entity who issues a token
      secret - the secret which is used to generate a signature
      validSeconds - the valid period of a token in seconds
      leewaySeconds - the leeway when there is a clock skew times between the signer and the verifier, in seconds.
      Throws:
      UnsupportedEncodingException
    • newId

      String newId()
      Returns a newly-generated request ID.
    • validateId

      boolean validateId​(String id)
      Returns whether the specified ID is valid or not.