Class 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.
    • Field Detail

      • responseJwt

        @Nonnull
        private final com.nimbusds.jwt.JWT responseJwt
        The UserInfo claims inside a JWT.
      • claims

        @Nullable
        private com.nimbusds.openid.connect.sdk.claims.ClaimsSet claims
        The claims represented by the JWT, could be null if JWT is encrypted and has not yet been decrypted.
    • Constructor Detail

      • JWTUserInfoResponse

        public JWTUserInfoResponse​(@Nonnull
                                   com.nimbusds.jwt.JWT jwt)
        Constructor.
        Parameters:
        jwt - the plain, signed, and or encrypted JWT representing UserInfo claims.
    • Method Detail

      • getResponseJwt

        @Nonnull
        public com.nimbusds.jwt.JWT getResponseJwt()
        Get the UserInfo JWT response.
        Returns:
        the UserInfo JWT response.
      • getSub

        @Nullable
        public String getSub()
        Description copied from interface: UserInfoResponse
        Get the subject identifier for the authenticated end-user.
        Specified by:
        getSub in interface UserInfoResponse
        Returns:
        the subject identifier.
      • 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:
        isSigned in interface UserInfoResponse
        Returns:
        true iff the response was signed.
      • isEncrypted

        public boolean isEncrypted()
        Description copied from interface: UserInfoResponse
        Is the response encrypted i.e. a JWE response. Note, it could also be signed.
        Specified by:
        isEncrypted in interface UserInfoResponse
        Returns:
        true iff the response is encrypted.