Class RetryingTokenAuthenticator
- java.lang.Object
-
- org.shakespeareframework.retrofit.oauth2.RetryingTokenAuthenticator
-
- All Implemented Interfaces:
okhttp3.Authenticator
- Direct Known Subclasses:
ResourceOwnerPasswordTokenAuthenticator
public abstract class RetryingTokenAuthenticator extends java.lang.Object implements okhttp3.Authenticator
Authenticator
that will retry authentication at the #tokenServiceUrl formaxRetries
times.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.shakespeareframework.retrofit.oauth2.Oauth2Api
oauth2Api
-
Constructor Summary
Constructors Modifier Constructor Description protected
RetryingTokenAuthenticator(java.lang.String tokenServiceUrl, int maxRetries)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description okhttp3.Request
authenticate(okhttp3.Route route, okhttp3.Response response)
protected abstract Oauth2Token
getToken()
-
-
-
Method Detail
-
authenticate
@Nullable public okhttp3.Request authenticate(@Nullable okhttp3.Route route, @Nonnull okhttp3.Response response)
- Specified by:
authenticate
in interfaceokhttp3.Authenticator
-
getToken
protected abstract Oauth2Token getToken()
-
-