public interface LoginMethod
connect URL
, for instance in a
WebView
. The URL will start the connect process on Gluon CloudLink and might redirect the
browser to another website, e.g. Facebook. When the connect flow has finished, the browser will finally be redirected
to the callback URL
. The response from this URL contains information about the connected
user as a JSON object.Modifier and Type | Interface and Description |
---|---|
static class |
LoginMethod.Type
Defines the different methods by which you can log in to Gluon CloudLink.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCallbackUrl()
Constructs the URL that identifies the callback URL that will be called on Gluon CloudLink as the final step in
the connect flow.
|
java.lang.String |
getConnectUrl()
Constructs the URL that needs to be called to initiate the connect flow for this login method on Gluon CloudLink.
|
RestClient |
getLoginUrl(java.lang.String username,
java.lang.String password)
Returns a configured instance of a RestClient that must be used when verifying the login credentials of a user
when authenticating with the
LoginMethod.Type.PASSWORD login method. |
java.util.Optional<java.lang.String> |
getProperty(java.lang.String key)
Return the value of a custom property of the LoginMethod.
|
RestClient |
getSignUpUrl(java.lang.String name,
java.lang.String username,
java.lang.String password)
Returns a configured instance of a RestClient that must be used when signing up a new user that is authenticating
with the
LoginMethod.Type.PASSWORD login method. |
LoginMethod.Type |
getType()
Returns the type of the LoginMethod and defines which service will be used for connecting Gluon CloudLink users.
|
LoginMethod.Type getType()
java.util.Optional<java.lang.String> getProperty(java.lang.String key)
key
- the key of the property to look upjava.lang.String getConnectUrl()
java.lang.String getCallbackUrl()
RestClient getLoginUrl(java.lang.String username, java.lang.String password)
LoginMethod.Type.PASSWORD
login method. The RestClient is configured as an
HTTP POST request with the following form parameters:
username
- the username of the user that was used when signing uppassword
- the password of the userRestClient getSignUpUrl(java.lang.String name, java.lang.String username, java.lang.String password)
LoginMethod.Type.PASSWORD
login method. The RestClient is configured as an HTTP POST request
with the following form parameters:
name
- the full name of the user that is signing upusername
- the username of the user, used for future loginspassword
- the password of the user