Created
December 2, 2018 16:13
-
-
Save naturalwarren/486903b9d609ea3fdadbe23ea36910a8 to your computer and use it in GitHub Desktop.
Contract for providing and refreshing an access token.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Provides an access token for request authorization. | |
*/ | |
interface AccessTokenProvider { | |
/** | |
* Returns an access token. In the event that you don't have a token return null. | |
*/ | |
fun token(): String? | |
/** | |
* Refreshes the token and returns it. This call should be made synchronously. | |
* In the event that the token could not be refreshed return null. | |
*/ | |
fun refreshToken(): String? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment