类 AndroidAuthenticator
java.lang.Object
com.android.volley.toolbox.AndroidAuthenticator
- 所有已实现的接口:
Authenticator
An Authenticator that uses
AccountManager to get auth
tokens of a specified type for a specified account.-
构造器概要
构造器构造器说明AndroidAuthenticator(android.content.Context context, android.accounts.Account account, String authTokenType) Creates a new authenticator.AndroidAuthenticator(android.content.Context context, android.accounts.Account account, String authTokenType, boolean notifyAuthFailure) Creates a new authenticator. -
方法概要
修饰符和类型方法说明android.accounts.AccountReturns the Account being used by this authenticator.Synchronously retrieves an auth token.voidinvalidateAuthToken(String authToken) Invalidates the provided auth token.
-
构造器详细资料
-
AndroidAuthenticator
public AndroidAuthenticator(android.content.Context context, android.accounts.Account account, String authTokenType) Creates a new authenticator.- 参数:
context- Context for accessing AccountManageraccount- Account to authenticate asauthTokenType- Auth token type passed to AccountManager
-
AndroidAuthenticator
public AndroidAuthenticator(android.content.Context context, android.accounts.Account account, String authTokenType, boolean notifyAuthFailure) Creates a new authenticator.- 参数:
context- Context for accessing AccountManageraccount- Account to authenticate asauthTokenType- Auth token type passed to AccountManagernotifyAuthFailure- Whether to raise a notification upon auth failure
-
-
方法详细资料
-
getAccount
public android.accounts.Account getAccount()Returns the Account being used by this authenticator. -
getAuthToken
从接口复制的说明:AuthenticatorSynchronously retrieves an auth token.- 指定者:
getAuthToken在接口中Authenticator- 抛出:
AuthFailureError- If authentication did not succeed
-
invalidateAuthToken
从接口复制的说明:AuthenticatorInvalidates the provided auth token.- 指定者:
invalidateAuthToken在接口中Authenticator
-