public class TokenServiceImpl extends StravaServiceImpl<TokenAPI> implements TokenService
requestRate, requestRateDaily, restService| Modifier and Type | Method and Description |
|---|---|
TokenResponse |
deauthorise(Token accessToken)
Allows an application to revoke its access to an athlete's data.
|
static TokenService |
instance(Token token)
Returns an instance of
token services |
accessTokenIsValid, getToken, requestRateDailyPercentage, requestRatePercentagepublic static TokenService instance(Token token) throws UnauthorizedException
Returns an instance of token services
Instances are cached so that if 2 requests are made for the same token, the same instance is returned
token - The Strava access token to be used in requests to the Strava APIUnauthorizedException - If the token used to create the service is invalidpublic TokenResponse deauthorise(Token accessToken) throws UnauthorizedException
TokenServiceAllows an application to revoke its access to an athlete's data.
This will invalidate all access tokens associated with the athlete, application pair used to create the token. The application will be removed from the StravaAthlete Settings page on Strava.
All requests made using invalidated tokens will receive a 401 Unauthorised response.
URL POST https://www.strava.com/oauth/deauthorize
deauthorise in interface TokenServiceaccessToken - The access token for which the application is revoking its access.UnauthorizedException - if the token is not allowed to be deauthorisedTokenService.deauthorise(Token)Copyright © 2015 Dan Shannon. All rights reserved.