org.jboss.aerogear.android.authentication
Class AbstractAuthenticationModule
java.lang.Object
org.jboss.aerogear.android.authentication.AbstractAuthenticationModule
- All Implemented Interfaces:
- AuthenticationModule
- Direct Known Subclasses:
- AGSecurityAuthenticationModule, HttpBasicAuthenticationModule, HttpDigestAuthenticationModule
public abstract class AbstractAuthenticationModule
- extends Object
- implements AuthenticationModule
This class stubs out the enroll, login, and logout methods. If you call these
methods without overriding them they will throw an IllegalStateException in
the callback. This will be passed to onFailure as normal.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
THREAD_POOL_EXECUTOR
protected static final Executor THREAD_POOL_EXECUTOR
AbstractAuthenticationModule
public AbstractAuthenticationModule()
enroll
public void enroll(Map<String,String> userData,
Callback<HeaderAndBody> callback)
- Description copied from interface:
AuthenticationModule
- Will try to register a user with a service using userData.
It will call the callbacks onSuccess with a parameter of a Map of the
values returned by the enroll service or onFailure if there is an error
- Specified by:
enroll in interface AuthenticationModule
login
public void login(String username,
String password,
Callback<HeaderAndBody> callback)
- Description copied from interface:
AuthenticationModule
- Will try to log in a user using username and password.
It will call the callbacks onSuccess with a parameter of a Map of the
values returned by the enroll service or onFailure if there is an error
- Specified by:
login in interface AuthenticationModule
logout
public void logout(Callback<Void> callback)
- Description copied from interface:
AuthenticationModule
- Performs a logout of the current user.
It will call callback.onSuccess with no value on success and
callback.onFailure if there is an error.
- Specified by:
logout in interface AuthenticationModule
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.