public interface AuthenticationView
Modifier and Type | Method and Description |
---|---|
void |
addLoginMethod(LoginMethod loginMethod)
Gluon Mobile will initially retrieve the login methods that are defined by a
Gluon application from Gluon Cloud.
|
void |
authenticate(java.util.function.Consumer<java.lang.String> contentConsumer)
This method is called every time a request to Gluon Cloud is made that
requires an authenticated user and no authenticated user is currently
active in the application.
|
void |
setGluonClient(GluonClient gluonClient)
Every AuthenticationView needs an instance of GluonClient that contains
the credentials and host information to connect to Gluon Cloud.
|
void setGluonClient(GluonClient gluonClient)
gluonClient
- an instance of GluonClientvoid addLoginMethod(LoginMethod loginMethod)
loginMethod
- a new login method that is available for this
application.void authenticate(java.util.function.Consumer<java.lang.String> contentConsumer)
contentConsumer
will be called with
a JSON string that represents the connected user.contentConsumer
- a Consumer that is called when authentication
finished.