Package com.pingidentity.sdk.accessgrant
Class AccessGrant
java.lang.Object
com.pingidentity.sdk.accessgrant.AccessGrant
The representation of the Access Grant.
-
Constructor Summary
ConstructorsConstructorDescriptionAccessGrant constructor.AccessGrant(String rawValue, String uniqueUserId, Scope scope, String clientId, String grantType, String ctxQual) AccessGrant constructor.AccessGrant(String hashedRefreshTokenValue, String guid, String uniqueUserId, String grantType, Scope scope, String clientId, long issued, long updated, Long expires, String ctxQual) AccessGrant constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet theAuthorizationDetails.Get the client id.Get the contextual qualifier.Get the expires timestamp in milliseconds.Get the grant type.getGuid()Get the guid.Get the hashed refresh token valuelongGet the issued timestamp in milliseconds.getScope()Get the scope.Get the unique user identifier.longGet the updated timestamp in milliseconds.booleanDetermines if the access grant is expired.voidsetAuthorizationDetails(AuthorizationDetails authorizationDetails) Set theAuthorizationDetails.voidsetClientId(String clientId) Set the client id.voidsetContextualQualifier(String contextualQualifier) Set the contextual qualifer.voidsetExpires(Long expires) Set the expires timestamp in milliseconds.voidSet the guid.voidsetRawRefreshTokenValue(String rawValue) Set the raw refresh token value.voidSet the scope.voidsetUniqueUserIdentifer(String uniqueUserIdentifier) Set the unique user identifier.
-
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
Get the guid.- Returns:
- The guid of the access grant.
-
setGuid
Set the guid.- Parameters:
guid- the guid of the access grant.
-
getGrantType
Get the grant type.- Returns:
- The grant type of the access grant.
-
getHashedRefreshTokenValue
Get the hashed refresh token value- Returns:
- The hashed refresh token value of the access grant.
-
setRawRefreshTokenValue
Set the raw refresh token value.- Parameters:
rawValue- the raw refresh token value of the access grant.
-
getUniqueUserIdentifer
Get the unique user identifier.- Returns:
- The unique user identifier of the access grant.
-
setUniqueUserIdentifer
Set the unique user identifier.- Parameters:
uniqueUserIdentifier- the unique user identifier of the access grant.
-
getClientId
Get the client id.- Returns:
- The client id of the access grant.
-
setClientId
Set the client id.- Parameters:
clientId- the client id of the access grant.
-
getScope
Get the scope.- Returns:
- The scope of the access grant.
-
setScope
Set the scope.- Parameters:
scope- the scope of the access grant.
-
getAuthorizationDetails
Get theAuthorizationDetails.- Returns:
- The
AuthorizationDetailsof the access grant.
-
setAuthorizationDetails
Set theAuthorizationDetails.- Parameters:
authorizationDetails- theAuthorizationDetailsof 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
Set the expires timestamp in milliseconds.- Parameters:
expires- the expiration time of the access grant.
-
getExpires
Get the expires timestamp in milliseconds.- Returns:
- The expires timestamp.
-
getContextualQualifier
Get the contextual qualifier.- Returns:
- The contextual qualifier of the access grant.
-
setContextualQualifier
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.
-