Class: LoginBuilder

LoginBuilder

(private) new LoginBuilder()

Login utilities
Source:

Methods

__setDomain(domain) → {LoginBuilder}

Set domain application. Used in MSISDN flow only. TEMPORARY AND ONLY FOR TEST!
Parameters:
Name Type Description
domain String the aplpication domain
Source:
Returns:
the same instance
Type
LoginBuilder

getCustomLoginFlow() → {CustomLoginFlow}

Create a custom login flow.
Source:
Returns:
Type
CustomLoginFlow

getExternalLoginFlow() → {ExternalLoginFlow}

Create a external login flow.
Source:
Returns:
Type
ExternalLoginFlow

getExternalLoginFlow() → {ExternalLoginFlow}

Create a external login flow.
Source:
Returns:
Type
ExternalLoginFlow

getOAuthLoginFlow() → {OAuthLoginFlow}

Create a custom login flow.
Source:
Returns:
Type
OAuthLoginFlow

setAllowCustomLogin() → {LoginBuilder}

Persist the custom login among the page refreshing. A session cookie is set.
Source:
Returns:
the same instance
Type
LoginBuilder

setCustomData(loginData) → {LoginBuilder}

Set login data. Useful to track campaign parameters
Parameters:
Name Type Description
loginData Newton.SimpleObject the custom data for the login event
Source:
Returns:
the same instance
Type
LoginBuilder

setCustomID(externalID) → {LoginBuilder}

Set external id. Used in external flow only.
Parameters:
Name Type Description
externalID String external user id
Source:
Returns:
the same instance
Type
LoginBuilder

setCustomID(customID) → {LoginBuilder}

Set custom id. Used in custom flow only.
Parameters:
Name Type Description
customID String custom user id
Source:
Returns:
the same instance
Type
LoginBuilder

setErrorUrl(errorUrl) → {LoginBuilder}

Set error url. Used in OAuthLoginFlow
Parameters:
Name Type Description
errorUrl String
Source:
Returns:
the same instance
Type
LoginBuilder

setOAuthProvider(oauth) → {LoginBuilder}

Set oauth provider needed for OAuthLoginFlow
Parameters:
Name Type Description
oauth String provider
Source:
Returns:
the same instance
Type
LoginBuilder

setOnFlowCompleteCallback(callback) → {LoginBuilder}

Set callback
Parameters:
Name Type Description
callback FlowCompleteCallback Invoked at the end of the login flow
Source:
Returns:
the same instance
Type
LoginBuilder

setReturnUrl(returnUrl) → {LoginBuilder}

Set return url. Used in OAuthLoginFlow
Parameters:
Name Type Description
returnUrl String
Source:
Returns:
the same instance
Type
LoginBuilder

setSubscribeUrl(subscribeUrl) → {LoginBuilder}

Set subscribe url. Used in MSISDN flow only.
Parameters:
Name Type Description
subscribeUrl String the login url
Source:
Returns:
the same instance
Type
LoginBuilder

setWaitingUrl(waitingUrl) → {LoginBuilder}

Set waiting url. Used in OAuthLoginFlow
Parameters:
Name Type Description
waitingUrl String
Source:
Returns:
the same instance
Type
LoginBuilder