Class JWTUserInfoResponse
- java.lang.Object
-
- net.shibboleth.idp.plugin.authn.oidc.rp.messaging.JWTUserInfoResponse
-
- All Implemented Interfaces:
UserInfoResponse
public class JWTUserInfoResponse extends Object implements UserInfoResponse
A UserInfo response returned as a JWT which maybe signed and or encrypted.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.shibboleth.idp.plugin.authn.oidc.rp.messaging.UserInfoResponse
UserInfoResponse.UserInfoResponseType
-
-
Field Summary
Fields Modifier and Type Field Description private com.nimbusds.openid.connect.sdk.claims.ClaimsSetclaimsThe claims represented by the JWT, could be null if JWT is encrypted and has not yet been decrypted.private com.nimbusds.jwt.JWTresponseJwtThe UserInfo claims inside a JWT.
-
Constructor Summary
Constructors Constructor Description JWTUserInfoResponse(com.nimbusds.jwt.JWT jwt)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.nimbusds.openid.connect.sdk.claims.ClaimsSetgetClaimsSet()Get the claims for the authenticated end-user.com.nimbusds.jwt.JWTgetResponseJwt()Get the UserInfo JWT response.StringgetSub()Get the subject identifier for the authenticated end-user.UserInfoResponse.UserInfoResponseTypegetType()Get the UserInfo response type.booleanisClaimsSetAvailable()Is the claims set available for use? if so,UserInfoResponse.getClaimsSet()should never return null.booleanisEncrypted()Is the response encrypted i.e.booleanisSigned()Is the response signed i.e.
-
-
-
Method Detail
-
getResponseJwt
@Nonnull public com.nimbusds.jwt.JWT getResponseJwt()
Get the UserInfo JWT response.- Returns:
- the UserInfo JWT response.
-
getClaimsSet
@Nullable public com.nimbusds.openid.connect.sdk.claims.ClaimsSet getClaimsSet()
Description copied from interface:UserInfoResponseGet the claims for the authenticated end-user.- Specified by:
getClaimsSetin interfaceUserInfoResponse- Returns:
- the claims for the authenticated end-user. Can be null if
the underlying claims are not available and
UserInfoResponse.isClaimsSetAvailable()is false e.g. an encrypted JWT which has not yet been decrypted. IfUserInfoResponse.isClaimsSetAvailable()is true, this should never return null.
-
getSub
@Nullable public String getSub()
Description copied from interface:UserInfoResponseGet the subject identifier for the authenticated end-user.- Specified by:
getSubin interfaceUserInfoResponse- Returns:
- the subject identifier.
-
isClaimsSetAvailable
public boolean isClaimsSetAvailable()
Description copied from interface:UserInfoResponseIs the claims set available for use? if so,UserInfoResponse.getClaimsSet()should never return null.- Specified by:
isClaimsSetAvailablein interfaceUserInfoResponse- Returns:
- true iff the claims set can be used.
-
isSigned
public boolean isSigned()
Is the response signed i.e. a JWS response. There is no easy way to determine if signed when nested inside a JWE, unless first decrypted.- Specified by:
isSignedin interfaceUserInfoResponse- Returns:
- true iff the response was signed.
-
isEncrypted
public boolean isEncrypted()
Description copied from interface:UserInfoResponseIs the response encrypted i.e. a JWE response. Note, it could also be signed.- Specified by:
isEncryptedin interfaceUserInfoResponse- Returns:
- true iff the response is encrypted.
-
getType
public UserInfoResponse.UserInfoResponseType getType()
Description copied from interface:UserInfoResponseGet the UserInfo response type.- Specified by:
getTypein interfaceUserInfoResponse- Returns:
- the response type, e.g. plain or JWT.
-
-