public class LoginMethod
extends java.lang.Object
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 | Class and Description |
---|---|
static class |
LoginMethod.Type
Defines the different methods by which you can log in to Gluon CloudLink.
|
Constructor and Description |
---|
LoginMethod(LoginMethod.Type type,
java.lang.String gluonBaseUrl,
GluonCredentials gluonCredentials)
Create a new LoginMethod with the specified properties.
|
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.
|
java.lang.String |
getLoginUrl()
Returns the URL that must be used when verifying the login credentials of a user when authenticating with the
LoginMethod.Type.PASSWORD login method. |
java.lang.String |
getSignUpUrl()
Returns the URL 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.
|
public LoginMethod(LoginMethod.Type type, java.lang.String gluonBaseUrl, GluonCredentials gluonCredentials)
type
- the type of the login method.gluonBaseUrl
- the base URL to Gluon CloudLink.gluonCredentials
- the application credentials to which this LoginMethod belongs to.public LoginMethod.Type getType()
public java.lang.String getConnectUrl()
public java.lang.String getCallbackUrl()
public java.lang.String getLoginUrl()
LoginMethod.Type.PASSWORD
login method. The returned URL must be used in an HTTP POST request, providing
the following form parameters:
public java.lang.String getSignUpUrl()
LoginMethod.Type.PASSWORD
login method. The returned URL must be used in an HTTP POST request, providing the following form parameters: