Class AccessGrant

java.lang.Object
com.pingidentity.sdk.accessgrant.AccessGrant

public class AccessGrant extends Object
The representation of the Access Grant.
  • Constructor Details

    • AccessGrant

      public AccessGrant(String hashedRefreshTokenValue, String guid, String uniqueUserId, String grantType, Scope scope, String clientId, long issued, long updated, Long expires, String ctxQual)
      AccessGrant constructor.
      Parameters:
      hashedRefreshTokenValue - the hashed refresh token value.
      guid - the guid representing the access grant.
      uniqueUserId - the user that has logged in.
      grantType - the type of grant issued (implicit, authorization code, etc).
      scope - the scope of the access grant.
      clientId - the client id.
      issued - the time since the epoch when the access grant was issued.
      updated - the time since the epoch when the access grant was updated.
      expires - the time since the epoch when the access grant expires.
      ctxQual - the contextual qualifier.
    • AccessGrant

      public AccessGrant(String rawValue, String uniqueUserId, Scope scope, String clientId, String grantType, String ctxQual)
      AccessGrant constructor.
      Parameters:
      rawValue - the raw value of the refresh token.
      uniqueUserId - the user that has logged in.
      scope - the scope of the access grant.
      clientId - the client the user logged in with.
      grantType - the type of grant.
      ctxQual - the contextual qualifier.
    • AccessGrant

      public AccessGrant(String uniqueUserId, Scope scope, String clientId, String grantType, String ctxQual)
      AccessGrant constructor. NOTE: this constructor doesn't set the refresh token.
      Parameters:
      uniqueUserId - the user that has logged in.
      scope - the scope of the access grant.
      clientId - the client the user logged in with.
      grantType - the type of grant.
      ctxQual - the contextual qualifier.
  • Method Details

    • getGuid

      public String getGuid()
      Get the guid.
      Returns:
      The guid of the access grant.
    • setGuid

      public void setGuid(String guid)
      Set the guid.
      Parameters:
      guid - the guid of the access grant.
    • getGrantType

      public String getGrantType()
      Get the grant type.
      Returns:
      The grant type of the access grant.
    • getHashedRefreshTokenValue

      public String getHashedRefreshTokenValue()
      Get the hashed refresh token value
      Returns:
      The hashed refresh token value of the access grant.
    • setRawRefreshTokenValue

      public void setRawRefreshTokenValue(String rawValue)
      Set the raw refresh token value.
      Parameters:
      rawValue - the raw refresh token value of the access grant.
    • getUniqueUserIdentifer

      public String getUniqueUserIdentifer()
      Get the unique user identifier.
      Returns:
      The unique user identifier of the access grant.
    • setUniqueUserIdentifer

      public void setUniqueUserIdentifer(String uniqueUserIdentifier)
      Set the unique user identifier.
      Parameters:
      uniqueUserIdentifier - the unique user identifier of the access grant.
    • getClientId

      public String getClientId()
      Get the client id.
      Returns:
      The client id of the access grant.
    • setClientId

      public void setClientId(String clientId)
      Set the client id.
      Parameters:
      clientId - the client id of the access grant.
    • getScope

      public Scope getScope()
      Get the scope.
      Returns:
      The scope of the access grant.
    • setScope

      public void setScope(Scope scope)
      Set the scope.
      Parameters:
      scope - the scope of the access grant.
    • getAuthorizationDetails

      public AuthorizationDetails getAuthorizationDetails()
      Returns:
      The AuthorizationDetails of the access grant.
    • setAuthorizationDetails

      public void setAuthorizationDetails(AuthorizationDetails authorizationDetails)
      Parameters:
      authorizationDetails - the AuthorizationDetails of the access grant.
    • getIssued

      public long getIssued()
      Get the issued timestamp in milliseconds.
      Returns:
      The issued timestamp.
    • getUpdated

      public long getUpdated()
      Get the updated timestamp in milliseconds.
      Returns:
      The updated timestamp.
    • setExpires

      public void setExpires(Long expires)
      Set the expires timestamp in milliseconds.
      Parameters:
      expires - the expiration time of the access grant.
    • getExpires

      public Long getExpires()
      Get the expires timestamp in milliseconds.
      Returns:
      The expires timestamp.
    • getContextualQualifier

      public String getContextualQualifier()
      Get the contextual qualifier.
      Returns:
      The contextual qualifier of the access grant.
    • setContextualQualifier

      public void setContextualQualifier(String contextualQualifier)
      Set the contextual qualifer.
      Parameters:
      contextualQualifier - the contextual qualifier of the access grant.
    • isExpired

      public boolean isExpired()
      Determines if the access grant is expired.
      Returns:
      Return true if the access grant is expired, false if it is not.