Package | Description |
---|---|
org.forgerock.json.jose.builders |
Classes and interfaces for builder to build JWTs using a fluent API.
|
org.forgerock.json.jose.jws |
Classes and interfaces for JWT signing and JWS'.
|
org.forgerock.json.jose.jws.handlers |
Signing Handler classes for each possible signing algorithm.
|
org.forgerock.json.jose.tokenhandler |
JWT implementation(s) of
TokenHandler . |
Modifier and Type | Method and Description |
---|---|
SignedEncryptedJwtBuilder |
EncryptedJwtBuilder.sign(SigningHandler signingHandler,
JwsAlgorithm jwsAlgorithm)
Deprecated.
|
EncryptedThenSignedJwtBuilder |
EncryptedJwtBuilder.signedWith(SigningHandler signingHandler,
JwsAlgorithm jwsAlgorithm)
Returns an
EncryptedThenSignedJwtBuilder that will build a signed JWT with this builder's encrypted JWT
as its payload. |
Constructor and Description |
---|
EncryptedThenSignedJwtBuilder(EncryptedJwtBuilder encryptedJwtBuilder,
SigningHandler signingHandler,
JwsAlgorithm jwsAlgorithm)
Constructs a new SignedEncryptedJwtBuilder that will use the given EncryptedJwtBuilder, to build the nested
Encrypted JWT, and the private key and JwsAlgorithm to sign the outer JWT.
|
SignedEncryptedJwtBuilder(EncryptedJwtBuilder encryptedJwtBuilder,
SigningHandler signingHandler,
JwsAlgorithm jwsAlgorithm)
Deprecated.
Constructs a new SignedEncryptedJwtBuilder that will use the given EncryptedJwtBuilder, to build the nested
Encrypted JWT, and the private key and JwsAlgorithm to sign the outer JWT.
|
Modifier and Type | Method and Description |
---|---|
JwsAlgorithm |
JwsHeader.getAlgorithm()
Gets the Algorithm set in the JWT header.
|
JwsAlgorithm |
SupportedEllipticCurve.getJwsAlgorithm()
Returns the JwsAlgorithm that corresponds to this elliptic curve.
|
static JwsAlgorithm |
JwsAlgorithm.getJwsAlgorithm(String algorithm)
Deprecated.
Replaced by
parseCryptographicAlgorithm(String) |
static JwsAlgorithm |
JwsAlgorithm.parseAlgorithm(String algorithm)
Parses the given algorithm string to find the matching JwsAlgorithm enum constant.
|
static JwsAlgorithm |
JwsAlgorithm.parseCryptographicAlgorithm(String algorithm)
Parses the given algorithm string to find the matching Java Cryptographic algorithm name.
|
static JwsAlgorithm |
JwsAlgorithm.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JwsAlgorithm[] |
JwsAlgorithm.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
SigningHandler.sign(JwsAlgorithm algorithm,
byte[] data)
Signs the given raw data bytes using the Java Cryptographic algorithm defined by the JwsAlgorithm.
|
byte[] |
RSASigningHandler.sign(JwsAlgorithm algorithm,
byte[] data)
Signs the given raw data bytes using the Java Cryptographic algorithm defined by the JwsAlgorithm.
|
byte[] |
NOPSigningHandler.sign(JwsAlgorithm algorithm,
byte[] data)
Returns an empty byte array.
|
byte[] |
HmacSigningHandler.sign(JwsAlgorithm algorithm,
byte[] data)
Signs the given raw data bytes using the Java Cryptographic algorithm defined by the JwsAlgorithm.
|
byte[] |
EdDSASigningHandler.sign(JwsAlgorithm algorithm,
byte[] data) |
byte[] |
ECDSASigningHandler.sign(JwsAlgorithm algorithm,
byte[] data) |
default byte[] |
SigningHandler.sign(JwsAlgorithm algorithm,
String data)
Signs the given String data using the Java Cryptographic algorithm defined by the JwsAlgorithm.
|
byte[] |
RSASigningHandler.sign(JwsAlgorithm algorithm,
String data)
Signs the given String data using the Java Cryptographic algorithm defined by the JwsAlgorithm.
|
byte[] |
NOPSigningHandler.sign(JwsAlgorithm algorithm,
String data)
Simply returns a byte array of a UTF-8 empty string.
|
byte[] |
HmacSigningHandler.sign(JwsAlgorithm algorithm,
String data)
Signs the given String data using the Java Cryptographic algorithm defined by the JwsAlgorithm.
|
byte[] |
ECDSASigningHandler.sign(JwsAlgorithm algorithm,
String data) |
boolean |
SigningHandler.verify(JwsAlgorithm algorithm,
byte[] data,
byte[] signature)
Verifies that the given signature is valid for the given data.
|
boolean |
RSASigningHandler.verify(JwsAlgorithm algorithm,
byte[] data,
byte[] signature)
Verifies that the given signature is valid for the given data.
|
boolean |
NOPSigningHandler.verify(JwsAlgorithm algorithm,
byte[] data,
byte[] signature)
Verifies that the signature length is zero.
|
boolean |
HmacSigningHandler.verify(JwsAlgorithm algorithm,
byte[] data,
byte[] signature)
Verifies that the given signature is valid for the given data.
|
boolean |
EdDSASigningHandler.verify(JwsAlgorithm algorithm,
byte[] data,
byte[] signature) |
boolean |
ECDSASigningHandler.verify(JwsAlgorithm algorithm,
byte[] data,
byte[] signature) |
Constructor and Description |
---|
JwtTokenHandler(JweAlgorithm jweAlgorithm,
EncryptionMethod jweMethod,
KeyPair jweKeyPair,
JwsAlgorithm jwsAlgorithm,
SigningHandler jwsHandler)
Constructs a new JWT token handler that never expires.
|
JwtTokenHandler(JweAlgorithm jweAlgorithm,
EncryptionMethod jweMethod,
KeyPair jweKeyPair,
JwsAlgorithm jwsAlgorithm,
SigningHandler jwsHandler,
Optional<Long> tokenLifeTimeInSeconds,
int tokenStatePaddingLength)
Constructs a new JWT token handler.
|
Copyright 2010-2022 ForgeRock AS.