Class OpenIdCredentials

  • All Implemented Interfaces:
    java.io.Serializable

    public class OpenIdCredentials
    extends java.lang.Object
    implements java.io.Serializable

    The credentials of an user to be authenticated with OpenID Connect. This will contain the OpenID ID Token and the OAuth 2.0 Access Token.

    This is constructed with an authorization code from the authentication request. This authorization code is then exchanged using redeemAuthCode(OpenIdConfiguration) for a response containing the ID Token and Access Token. The response is then validated against the OpenIdConfiguration.

    See Also:
    Serialized Form
    • Constructor Detail

      • OpenIdCredentials

        public OpenIdCredentials​(java.util.Map<java.lang.String,​java.lang.Object> claims)
      • OpenIdCredentials

        public OpenIdCredentials​(java.lang.String authCode,
                                 java.lang.String redirectUri)
    • Method Detail

      • getUserId

        public java.lang.String getUserId()
      • getClaims

        public java.util.Map<java.lang.String,​java.lang.Object> getClaims()
      • getResponse

        public java.util.Map<java.lang.String,​java.lang.Object> getResponse()
      • redeemAuthCode

        public void redeemAuthCode​(OpenIdConfiguration configuration)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isExpired

        public boolean isExpired()
      • checkExpiry

        public static boolean checkExpiry​(java.util.Map<java.lang.String,​java.lang.Object> claims)