public interface Authenticator
Modifier and Type | Method and Description |
---|---|
void |
deauthorize()
Deauthorizes the current user and clears any persistent state with regards to the current user.
|
void |
getToken(CompletionHandler<java.lang.String> handler)
Returns an access token of this authenticator.
|
boolean |
isAuthorized()
Returns True if the user is logically authorized.
|
void |
refreshToken(CompletionHandler<java.lang.String> handler)
Refresh an access token of this authenticator.
|
boolean isAuthorized()
This may not mean the user has a valid access token yet, but the authentication strategy should be able to obtain one without further user interaction.
void deauthorize()
Phone
is registered,
it should be deregistered before calling this method.void getToken(CompletionHandler<java.lang.String> handler)
This may involve long-running operations such as service calls, but may also return immediately. The application should not make assumptions about how quickly this completes.
handler
- a callback to be executed when completed, with the access token if successfuly retrieved, otherwise nil.void refreshToken(CompletionHandler<java.lang.String> handler)
This may involve long-running operations such as service calls, but may also return immediately. The application should not make assumptions about how quickly this completes.
handler
- a callback to be executed when completed, with the access token if successfuly retrieved, otherwise nil.