Package edu.ksu.lti.launch.service
Interface OauthTokenService
-
public interface OauthTokenServiceA service to be implemented and supplied as an autowire candidate by any consumers of this library- Author:
- alexanda, ssnelson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetRefreshToken(String userId)Fetch the refresh token from whatever persistence solution the consumer is currently usingStringstoreToken(String userId, String refreshToken)Stores a new refresh token in whatever persistence solution the consumer is usingStringupdateToken(String userId, String refreshToken)Updates the refresh token saved in the data source for a given user Should only be called on very specific situations, however it is necessary
-
-
-
Method Detail
-
getRefreshToken
String getRefreshToken(String userId)
Fetch the refresh token from whatever persistence solution the consumer is currently using- Parameters:
userId- The userId the refresh token needs to belong to- Returns:
- Refresh token to be used to get new API tokens, as a string
-
storeToken
String storeToken(String userId, String refreshToken)
Stores a new refresh token in whatever persistence solution the consumer is using- Parameters:
userId- The userId the refresh token belongs torefreshToken- The refresh token to be saved- Returns:
- Same refresh token passed in the refreshToken parameter
-
updateToken
String updateToken(String userId, String refreshToken)
Updates the refresh token saved in the data source for a given user Should only be called on very specific situations, however it is necessary- Parameters:
userId- The userId the refresh token belongs torefreshToken- The refresh token to be saved- Returns:
- Same refresh token passed in the refreshToken parameter
-
-