Class JWTOpenIdClaims
java.lang.Object
io.micronaut.security.oauth2.endpoint.token.response.JWTOpenIdClaims
- All Implemented Interfaces:
OpenIdClaims,Claims
An implementation of
OpenIdClaims backed by an JWTClaimsSet.- Since:
- 1.2.0
- Author:
- James Kleeh
-
Field Summary
Fields inherited from interface io.micronaut.security.token.Claims
ALL_CLAIMS, AUDIENCE, EXPIRATION_TIME, ISSUED_AT, ISSUER, KEY_ID, NOT_BEFORE, SUBJECT, TOKEN_IDFields inherited from interface io.micronaut.security.oauth2.endpoint.token.response.OpenIdClaims
CLAIMS_ACR, CLAIMS_ADDRESS, CLAIMS_AMR, CLAIMS_AUTH_TIME, CLAIMS_AZP, CLAIMS_BIRTHDATE, CLAIMS_EMAIL, CLAIMS_EMAIL_VERIFIED, CLAIMS_FAMILY_NAME, CLAIMS_GENDER, CLAIMS_GIVEN_NAME, CLAIMS_LOCALE, CLAIMS_MIDDLE_NAME, CLAIMS_NAME, CLAIMS_NICKNAME, CLAIMS_NONCE, CLAIMS_PHONE_NUMBER, CLAIMS_PHONE_NUMBER_VERIFIED, CLAIMS_PICTURE, CLAIMS_PREFERRED_USERNAME, CLAIMS_PROFILE, CLAIMS_UPDATED_AT, CLAIMS_WEBSITE, CLAIMS_ZONEINFO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable ObjectRetrieves a value from the claims for the given name.@Nullable Addressaddress.@Nullable String@Nullable Integer@Nullable String@Nullable String@Nullable StringgetEmail()@NonNull Date@Nullable Stringfamily_name.@Nullable String@Nullable Stringgiven_name.@NonNull Date@NonNull String@Nullable String@Nullable Stringmiddle_name.@Nullable StringgetName()name.@Nullable Stringnickname.@Nullable StringgetNonce()@Nullable String@Nullable String@Nullable Stringpreferred_username.@Nullable String@NonNull Stringsub.@Nullable Integer@Nullable String@Nullable Stringzoneinfo.@Nullable Boolean@Nullable Booleannames()
-
Constructor Details
-
JWTOpenIdClaims
public JWTOpenIdClaims(com.nimbusds.jwt.JWTClaimsSet claimsSet) - Parameters:
claimsSet- The JWT claims set
-
-
Method Details
-
getIssuer
- Specified by:
getIssuerin interfaceOpenIdClaims- Returns:
- Subject Identifier. A locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client,
-
getAudience
- Specified by:
getAudiencein interfaceOpenIdClaims- Returns:
- Audience(s) that this ID Token is intended for.
-
getExpirationTime
- Specified by:
getExpirationTimein interfaceOpenIdClaims- Returns:
- Expiration time on or after which the ID Token MUST NOT be accepted for processing.
-
getIssuedAt
- Specified by:
getIssuedAtin interfaceOpenIdClaims- Returns:
- Time at which the JWT was issued.
-
getSubject
Description copied from interface:OpenIdClaimssub.- Specified by:
getSubjectin interfaceOpenIdClaims- Returns:
- Identifier for the End-User at the Issuer.
-
getAuthorizedParty
- Specified by:
getAuthorizedPartyin interfaceOpenIdClaims- Returns:
- The party to which the ID Token was issued.
-
getAuthenticationMethodReferences
- Specified by:
getAuthenticationMethodReferencesin interfaceOpenIdClaims- Returns:
- Identifiers for authentication methods used in the authentication.
-
getAuthenticationContextClassReference
- Specified by:
getAuthenticationContextClassReferencein interfaceOpenIdClaims- Returns:
- Authentication Context Class Reference.
-
getAuthenticationTime
- Specified by:
getAuthenticationTimein interfaceOpenIdClaims- Returns:
- Time when the End-User authentication occurred.
-
getNonce
- Specified by:
getNoncein interfaceOpenIdClaims- Returns:
- String value used to associate a Client session with an ID Token, and to mitigate replay attacks.
-
getName
Description copied from interface:OpenIdClaimsname.- Specified by:
getNamein interfaceOpenIdClaims- Returns:
- End-User's full name in displayable form including all name parts, possibly including titles and suffixes, ordered according to the End-User's locale and preferences.
-
getGivenName
Description copied from interface:OpenIdClaimsgiven_name.- Specified by:
getGivenNamein interfaceOpenIdClaims- Returns:
- Given name(s) or first name(s) of the End-User. Note that in some cultures, people can have multiple given names; all can be present, with the names being separated by space characters.
-
getFamilyName
Description copied from interface:OpenIdClaimsfamily_name.- Specified by:
getFamilyNamein interfaceOpenIdClaims- Returns:
- Surname(s) or last name(s) of the End-User. Note that in some cultures, people can have multiple family names or no family name; all can be present, with the names being separated by space characters.
-
getMiddleName
Description copied from interface:OpenIdClaimsmiddle_name.- Specified by:
getMiddleNamein interfaceOpenIdClaims- Returns:
- Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can be present, with the names being separated by space characters. Also note that in some cultures, middle names are not used.
-
getNickname
Description copied from interface:OpenIdClaimsnickname.- Specified by:
getNicknamein interfaceOpenIdClaims- Returns:
- Casual name of the End-User that may or may not be the same as the given_name. For instance, a nickname value of Mike might be returned alongside a given_name value of Michael.
-
getPreferredUsername
Description copied from interface:OpenIdClaimspreferred_username.- Specified by:
getPreferredUsernamein interfaceOpenIdClaims- Returns:
- Shorthand name by which the End-User wishes to be referred to at the RP, such as janedoe or j.doe. This value MAY be any valid JSON string including special characters such as @, /, or whitespace. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.
-
getProfile
- Specified by:
getProfilein interfaceOpenIdClaims- Returns:
- URL of the End-User's profile page. The contents of this Web page SHOULD be about the End-User.
-
getPicture
- Specified by:
getPicturein interfaceOpenIdClaims- Returns:
- URL of the End-User's profile picture. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file), rather than to a Web page containing an image. Note that this URL SHOULD specifically reference a profile photo of the End-User suitable for displaying when describing the End-User, rather than an arbitrary photo taken by the End-User.
-
getWebsite
- Specified by:
getWebsitein interfaceOpenIdClaims- Returns:
- URL of the End-User's Web page or blog. This Web page SHOULD contain information published by the End-User or an organization that the End-User is affiliated with.
-
getEmail
- Specified by:
getEmailin interfaceOpenIdClaims- Returns:
- End-User's preferred e-mail address. Its value MUST conform to the RFC 5322 [RFC5322] addr-spec syntax. The RP MUST NOT rely upon this value being unique, as discussed in Section 5.7.
-
isEmailVerified
- Specified by:
isEmailVerifiedin interfaceOpenIdClaims- Returns:
- True if the End-User's e-mail address has been verified; otherwise false.
-
getGender
- Specified by:
getGenderin interfaceOpenIdClaims- Returns:
- End-User's gender. Values defined by this specification are female and male. Other values MAY be used when neither of the defined values are applicable.
-
getBirthday
- Specified by:
getBirthdayin interfaceOpenIdClaims- Returns:
- End-User's birthday, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.
-
getZoneinfo
Description copied from interface:OpenIdClaimszoneinfo.- Specified by:
getZoneinfoin interfaceOpenIdClaims- Returns:
- String from zoneinfo [zoneinfo] time zone database representing the End-User's time zone. For example, Europe/Paris or America/Los_Angeles.
-
getLocale
- Specified by:
getLocalein interfaceOpenIdClaims- Returns:
- End-User's locale, represented as a BCP47 [RFC5646] language tag.
-
getPhoneNumber
- Specified by:
getPhoneNumberin interfaceOpenIdClaims- Returns:
- End-User's preferred telephone number
-
isPhoneNumberVerified
- Specified by:
isPhoneNumberVerifiedin interfaceOpenIdClaims- Returns:
- True if the End-User's phone number has been verified; otherwise false.
-
getAdress
Description copied from interface:OpenIdClaimsaddress.- Specified by:
getAdressin interfaceOpenIdClaims- Returns:
- End-User's preferred postal address.
-
getUpdatedAt
- Specified by:
getUpdatedAtin interfaceOpenIdClaims- Returns:
- Time the End-User's information was last updated.
-
getClaims
- Specified by:
getClaimsin interfaceOpenIdClaims- Returns:
- ID token claims
-
get
Description copied from interface:ClaimsRetrieves a value from the claims for the given name. -
names
-
contains
-