Package com.linecorp.armeria.server.saml
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 Summary
Modifier and TypeMethodDescriptionnewId()
Returns a newly-generated request ID.static SamlRequestIdManager
Returns aSamlRequestIdManager
implementation based on JSON Web Tokens specification.static SamlRequestIdManager
Returns aSamlRequestIdManager
implementation based on JSON Web Tokens specification with theAlgorithm
instance usingHmacSHA384
.boolean
validateId
(String id) Returns whether the specified ID is valid or not.
-
Method Details
-
ofJwt
static SamlRequestIdManager ofJwt(String issuer, Algorithm algorithm, int validSeconds, int leewaySeconds) Returns aSamlRequestIdManager
implementation based on JSON Web Tokens specification.- Parameters:
issuer
- the ID of the entity who issues a tokenalgorithm
- the algorithm instance which is used to create a signaturevalidSeconds
- the valid period of a token in secondsleewaySeconds
- 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 aSamlRequestIdManager
implementation based on JSON Web Tokens specification with theAlgorithm
instance usingHmacSHA384
.- Parameters:
issuer
- the ID of the entity who issues a tokensecret
- the secret which is used to generate a signaturevalidSeconds
- the valid period of a token in secondsleewaySeconds
- 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
Returns whether the specified ID is valid or not.
-