public class AccessTokenAuthenticator extends java.lang.Object implements Authenticator
| Constructor and Description |
|---|
AccessTokenAuthenticator(SessionConfiguration sessionConfiguration,
AccessTokenStorage tokenStorage) |
| Modifier and Type | Method and Description |
|---|---|
SessionConfiguration |
getSessionConfiguration()
Get SessionConfiguration used for authentication
|
AccessTokenStorage |
getTokenStorage()
Get AccessTokenStorage used for authentication
|
boolean |
isRefreshable()
Indicates whether this authenticator can be refreshed.
|
okhttp3.Request |
refresh(okhttp3.Response response)
Refresh authentication token that is used to
Authenticator.signRequest(Request.Builder) |
void |
signRequest(okhttp3.Request.Builder builder)
Add authentication header required to the request.
|
public AccessTokenAuthenticator(SessionConfiguration sessionConfiguration, AccessTokenStorage tokenStorage)
public void signRequest(okhttp3.Request.Builder builder)
AuthenticatorsignRequest in interface Authenticatorpublic boolean isRefreshable()
AuthenticatorisRefreshable in interface Authenticatorpublic okhttp3.Request refresh(okhttp3.Response response)
throws java.io.IOException
AuthenticatorAuthenticator.signRequest(Request.Builder)refresh in interface Authenticatorjava.io.IOExceptionpublic SessionConfiguration getSessionConfiguration()
getSessionConfiguration in interface Authenticatorpublic AccessTokenStorage getTokenStorage()