public interface JWTSigningAndValidationService
Modifier and Type | Method and Description |
---|---|
Map<String,com.nimbusds.jose.jwk.JWK> |
getAllPublicKeys()
Get all public keys for this service, mapped by their Key ID
|
Collection<com.nimbusds.jose.JWSAlgorithm> |
getAllSigningAlgsSupported()
Get the list of all signing algorithms supported by this service.
|
String |
getDefaultSignerKeyId() |
com.nimbusds.jose.JWSAlgorithm |
getDefaultSigningAlgorithm()
Get the default signing algorithm for use when nothing else has been specified.
|
void |
signJwt(com.nimbusds.jwt.SignedJWT jwt)
Called to sign a jwt in place for a client that hasn't registered a preferred signing algorithm.
|
void |
signJwt(com.nimbusds.jwt.SignedJWT jwt,
com.nimbusds.jose.JWSAlgorithm alg)
Sign a jwt using the selected algorithm.
|
boolean |
validateSignature(com.nimbusds.jwt.SignedJWT jwtString)
Checks the signature of the given JWT against all configured signers,
returns true if at least one of the signers validates it.
|
Map<String,com.nimbusds.jose.jwk.JWK> getAllPublicKeys()
boolean validateSignature(com.nimbusds.jwt.SignedJWT jwtString)
jwtString
- the string representation of the JWT as sent on the wireNoSuchAlgorithmException
void signJwt(com.nimbusds.jwt.SignedJWT jwt)
jwt
- the jwt to signNoSuchAlgorithmException
com.nimbusds.jose.JWSAlgorithm getDefaultSigningAlgorithm()
Collection<com.nimbusds.jose.JWSAlgorithm> getAllSigningAlgsSupported()
void signJwt(com.nimbusds.jwt.SignedJWT jwt, com.nimbusds.jose.JWSAlgorithm alg)
jwt
- the jwt to signalg
- the name of the algorithm to use, as specified in JWS s.6String getDefaultSignerKeyId()
Copyright © 2018. All rights reserved.