Package org.pac4j.jwt.config.signature
Interface SignatureConfiguration
-
- All Known Implementing Classes:
AbstractSignatureConfiguration
,ECSignatureConfiguration
,RSASignatureConfiguration
,SecretSignatureConfiguration
public interface SignatureConfiguration
Signature configuration.- Since:
- 1.9.2
- Author:
- Jerome Leleu
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.nimbusds.jwt.SignedJWT
sign(com.nimbusds.jwt.JWTClaimsSet claims)
Generate a signed JWT based on claims.boolean
supports(com.nimbusds.jose.JWSAlgorithm algorithm)
Whether this signature configuration supports this algorithm.boolean
verify(com.nimbusds.jwt.SignedJWT jwt)
Verify a signed JWT.
-
-
-
Method Detail
-
supports
boolean supports(com.nimbusds.jose.JWSAlgorithm algorithm)
Whether this signature configuration supports this algorithm.- Parameters:
algorithm
- the signature algorithm- Returns:
- whether this signature configuration supports this algorithm
-
sign
com.nimbusds.jwt.SignedJWT sign(com.nimbusds.jwt.JWTClaimsSet claims)
Generate a signed JWT based on claims.- Parameters:
claims
- the provided claims- Returns:
- the signed JWT
-
verify
boolean verify(com.nimbusds.jwt.SignedJWT jwt) throws com.nimbusds.jose.JOSEException
Verify a signed JWT.- Parameters:
jwt
- the signed JWT- Returns:
- whether the signed JWT is verified
- Throws:
com.nimbusds.jose.JOSEException
- exception when verifying the JWT
-
-