public interface AuthenticationView
Modifier and Type | Method and Description |
---|---|
void |
addLoginMethod(LoginMethod loginMethod)
Gluon Connect 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. When the user cancels
the view, you can pass in a null
value to the consumer,
which will notify Gluon Connect that the authentication process was aborted
by the user.contentConsumer
- a Consumer that is called when authentication
finished.