public class TokenAuthenticator extends BaseAuthorizer implements SessionCookieAuthorizer
LoginAuthorizer.ContinuationBlock| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG |
| Constructor and Description |
|---|
TokenAuthenticator(java.lang.String loginPath,
java.util.Map<java.lang.String,java.lang.String> params) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
implementedLoginResponse() |
java.util.List<java.lang.Object> |
loginRequest()
Returns the HTTP method, URL, and body of the login request to send, or nil for no login.
|
void |
loginResponse(java.lang.Object jsonResponse,
Headers headers,
java.lang.Throwable error,
LoginAuthorizer.ContinuationBlock block)
The replicator calls this method with the response to the login request.
|
getLocalUUID, getRemoteURL, getUsername, removeStoredCredentials, setLocalUUID, setRemoteURLclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocalUUID, getRemoteURL, getUsername, removeStoredCredentials, setLocalUUID, setRemoteURLpublic static final java.lang.String TAG
public TokenAuthenticator(java.lang.String loginPath,
java.util.Map<java.lang.String,java.lang.String> params)
public java.util.List<java.lang.Object> loginRequest()
LoginAuthorizerloginRequest in interface LoginAuthorizerpublic void loginResponse(java.lang.Object jsonResponse,
Headers headers,
java.lang.Throwable error,
LoginAuthorizer.ContinuationBlock block)
LoginAuthorizerloginResponse in interface LoginAuthorizerjsonResponse - The parsed JSON body of the response.headers - The HTTP response headers.error - The error, if the request failed.block - The authorizer must call this block at some future time. If the
`loginAgain` parameter is YES, the login will be repeated, with another call to
-loginRequestForSite:. If the NSError* parameter is non-nil, replication stops.public boolean implementedLoginResponse()
implementedLoginResponse in interface LoginAuthorizer