Interface UserInfoResponse
-
- All Known Implementing Classes:
JWTUserInfoResponse,PlainUserInfoResponse
public interface UserInfoResponseA User information response. Contains consent claims about a subject. A response is either a plain JSON object or a JWT.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classUserInfoResponse.UserInfoResponseTypeWhich type of response is this.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.nimbusds.openid.connect.sdk.claims.ClaimsSetgetClaimsSet()Get the claims for the authenticated end-user.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,getClaimsSet()should never return null.booleanisEncrypted()Is the response encrypted i.e.booleanisSigned()Is the response signed i.e.
-
-
-
Method Detail
-
getClaimsSet
@Nullable com.nimbusds.openid.connect.sdk.claims.ClaimsSet getClaimsSet()
Get the claims for the authenticated end-user.- Returns:
- the claims for the authenticated end-user. Can be null if
the underlying claims are not available and
isClaimsSetAvailable()is false e.g. an encrypted JWT which has not yet been decrypted. IfisClaimsSetAvailable()is true, this should never return null.
-
getSub
@Nullable String getSub()
Get the subject identifier for the authenticated end-user.- Returns:
- the subject identifier.
-
isClaimsSetAvailable
boolean isClaimsSetAvailable()
Is the claims set available for use? if so,getClaimsSet()should never return null.- Returns:
- true iff the claims set can be used.
-
isSigned
boolean isSigned()
Is the response signed i.e. a JWS response.- Returns:
- true iff the response was signed.
-
isEncrypted
boolean isEncrypted()
Is the response encrypted i.e. a JWE response. Note, it could also be signed.- Returns:
- true iff the response is encrypted.
-
getType
UserInfoResponse.UserInfoResponseType getType()
Get the UserInfo response type.- Returns:
- the response type, e.g. plain or JWT.
-
-