|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.android.volley.toolbox.AndroidAuthenticator
public class AndroidAuthenticator
An Authenticator that uses AccountManager
to get auth
tokens of a specified type for a specified account.
Constructor Summary | |
---|---|
AndroidAuthenticator(Context context,
Account account,
String authTokenType)
Creates a new authenticator. |
|
AndroidAuthenticator(Context context,
Account account,
String authTokenType,
boolean notifyAuthFailure)
Creates a new authenticator. |
Method Summary | |
---|---|
Account |
getAccount()
Returns the Account being used by this authenticator. |
String |
getAuthToken()
Synchronously retrieves an auth token. |
void |
invalidateAuthToken(String authToken)
Invalidates the provided auth token. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AndroidAuthenticator(Context context, Account account, String authTokenType)
context
- Context for accessing AccountManageraccount
- Account to authenticate asauthTokenType
- Auth token type passed to AccountManagerpublic AndroidAuthenticator(Context context, Account account, String authTokenType, boolean notifyAuthFailure)
context
- Context for accessing AccountManageraccount
- Account to authenticate asauthTokenType
- Auth token type passed to AccountManagernotifyAuthFailure
- Whether to raise a notification upon auth failureMethod Detail |
---|
public Account getAccount()
public String getAuthToken() throws AuthFailureError
Authenticator
getAuthToken
in interface Authenticator
AuthFailureError
- If authentication did not succeedpublic void invalidateAuthToken(String authToken)
Authenticator
invalidateAuthToken
in interface Authenticator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |