public class ServiceAuthenticator extends AbstractScopedAuthenticator<Context>
A HTTP authenticator which selects credentials based upon service context
found in the provided Context
. May also optionally use fallback
credentials for URIs for which authentication has not been explicitly
configured. This works only with the Basic and Digest authentication schemes
so you may need to use an alternative authenticator if you need to use
another authentication scheme.
Constructor and Description |
---|
ServiceAuthenticator()
Creates new authenticator using the standard ARQ context
|
ServiceAuthenticator(Context context)
Creates a new authenticator using the given context
|
ServiceAuthenticator(Context context,
String username,
char[] password)
Creates a new authenticator using the given context, the provided
credentials are used as fallback if the context contains no registered
credentials for a target URI
|
ServiceAuthenticator(String username,
char[] password)
Creates a new authenticator using the standard ARQ context, the provided
credentials are used as fallback if the context contains no registered
credentials for a target URI
|
public ServiceAuthenticator()
public ServiceAuthenticator(String username, char[] password)
username
- Fallback user namepassword
- Fallback passwordpublic ServiceAuthenticator(Context context)
context
- Contextpublic ServiceAuthenticator(Context context, String username, char[] password)
context
- Contextusername
- Fallback user namepassword
- Fallback passwordLicenced under the Apache License, Version 2.0