public class JwtHandler extends Object
Constructor and Description |
---|
JwtHandler(JwtHandlerConfig config) |
Modifier and Type | Method and Description |
---|---|
org.forgerock.json.jose.jwt.JwtClaimsSet |
getJwtClaims(String jwtValue)
Get the set of claims contained within the specified token.
|
static boolean |
isFromValidAuthorizedParty(Set<String> acceptedAuthorizedParties,
org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims)
Check whether or not the token is from one of the accepted authorized parties specified.
|
static boolean |
isIntendedForAudience(String audienceName,
org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims)
Check whether or not the token is designated for the specified audience.
|
static boolean |
jwtHasAuthorizedPartyClaim(org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims)
Check if the token has an authorized party ("azp") entry.
|
org.forgerock.json.jose.jwt.JwtClaimsSet |
validateJwt(String jwtValue)
Validate the integrity of the JWT OIDC token, according to the spec
(http://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation).
|
public JwtHandler(JwtHandlerConfig config)
public org.forgerock.json.jose.jwt.JwtClaimsSet validateJwt(String jwtValue) throws AuthLoginException
jwtValue
- The encoded JWT string.AuthLoginException
public static boolean isIntendedForAudience(String audienceName, org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims) throws AuthLoginException
audienceName
- The audience name to check that the token is intended for.jwtClaims
- The parsed JWT claims.AuthLoginException
public static boolean isFromValidAuthorizedParty(Set<String> acceptedAuthorizedParties, org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims) throws AuthLoginException
acceptedAuthorizedParties
- A list of accepted authorized parties.jwtClaims
- The parsed JWT claims.AuthLoginException
public static boolean jwtHasAuthorizedPartyClaim(org.forgerock.json.jose.jwt.JwtClaimsSet jwtClaims) throws AuthLoginException
jwtClaims
- The parsed JWT claims.AuthLoginException
public org.forgerock.json.jose.jwt.JwtClaimsSet getJwtClaims(String jwtValue) throws AuthLoginException
jwtValue
- The encoded JWT string.AuthLoginException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.