public interface AccessTokenManager
| Modifier and Type | Interface and Description |
|---|---|
static class |
AccessTokenManager.UpdateField |
| Modifier and Type | Method and Description |
|---|---|
AccessToken |
findByToken(java.lang.String appRef,
java.lang.String accessTokenStr) |
java.lang.String |
findByXRef(java.lang.String appRef,
XInfoImpl xInfo)
Returns the access token for the specified application partner, user pair
|
java.time.Instant |
getExpiration(java.lang.String appRef,
java.lang.String accessTokenStr) |
ExternalReference |
getXRef(java.lang.String accessTokenStr)
Returns the access token for the specified application partner, user pair
|
int |
getXUserId(java.lang.String appRef,
java.lang.String accessTokenStr)
Returns the external user ID for the specified application partner, access token pair.
|
void |
invalidateToken(java.lang.String appRef,
java.lang.String accessTokenStr) |
boolean |
isExpired(java.lang.String appRef,
java.lang.String accessTokenStr) |
java.lang.String |
persist(java.lang.String partnerRef,
XInfoImpl xInfo) |
java.lang.String |
persist(XInfoImpl xInfo)
Creates, stores, and returns an access token for the specified user for the
current partner.
|
void |
purge(int unusedDays)
Delete your application's access tokens that have been unused for a specified number of days.
|
void |
purge(java.lang.String appRef,
int unusedDays)
For an admin application: Delete tokens that have been unused for a specified number of days.
|
java.lang.String |
renewToken(java.lang.String appRef,
java.lang.String accessTokenStr) |
java.lang.String persist(XInfoImpl xInfo) throws NotFoundException
xInfo - A User's XPairNotFoundExceptionjava.lang.String persist(java.lang.String partnerRef,
XInfoImpl xInfo)
throws NotFoundException
NotFoundExceptionint getXUserId(java.lang.String appRef,
java.lang.String accessTokenStr)
throws NotFoundException
appRef - Application partner referenceaccessTokenStr - Access tokenNotFoundExceptionInvalidPartnerExceptionExternalReference getXRef(java.lang.String accessTokenStr)
appRef - Application partner referencexUserId - External user ID of interestNotFoundExceptionInvalidPartnerExceptionjava.lang.String findByXRef(java.lang.String appRef,
XInfoImpl xInfo)
throws NotFoundException
appRef - Application partner referencexInfo - External user infoNotFoundExceptionInvalidPartnerExceptionjava.lang.String renewToken(java.lang.String appRef,
java.lang.String accessTokenStr)
throws NotFoundException
NotFoundExceptionvoid invalidateToken(java.lang.String appRef,
java.lang.String accessTokenStr)
throws NotFoundException
NotFoundExceptionjava.time.Instant getExpiration(java.lang.String appRef,
java.lang.String accessTokenStr)
throws NotFoundException
NotFoundExceptionboolean isExpired(java.lang.String appRef,
java.lang.String accessTokenStr)
throws NotFoundException
NotFoundExceptionAccessToken findByToken(java.lang.String appRef, java.lang.String accessTokenStr) throws NotFoundException
NotFoundExceptionvoid purge(int unusedDays)
unusedDays - Length of time, in days, a token has been unused.void purge(java.lang.String appRef,
int unusedDays)
If appRef is not same as the application calling the method, the caller must be the admin app.
appRef - Application reference whose tokens are to be purged.unusedDays - Length of time, in days, a token has been unused.