Authenticate A User
To authenticate a user, invoke the
authorize() function with success and failure callback functions.
authorize(identifier, successCallback, failureCallback)
|identifier:||string Platform User username, user push ID, or Directory User identifier for the user
|successCallback:||string Function to be called on successful authentication
|failureCallback:||string Function to be called on failed authentication
LKAuthenticationManager.Instance.authorize(username, authorizeSuccessCallback, authorizeFailureCallback);
This will send an authentication request to the end user. Once the user has authorized the request, the
authorizeSuccessCallback function will be called and will return the user hash, auth request identifier, app pins
and device ID. If an error occurs, the
authorizeFailureCallback function will be called and will include an
error code and message indicating what went wrong.
Example Callback Functions:
public void authorizeSuccessCallback(string userHash, string authRequest, string deviceId)
public void authorizeFailureCallback(string errorMessage, string errorCode)
Returns - Successful
|userHash:||Unique string used to identify the user in the future
|authRequest:||Used to identify the authentication request in subsequent requests
|deviceId:||User device identifier
Returns - Failed
Click here for an explanation of error codes.
|errorCode:||Code used to identity error type
LaunchKey links to user contributed code as a resource to its community. LaunchKey does not in any way
guarantee or warrant the quality and security of these code bases. User contributed code is supported by the
creators. If you do find a link from the site to user contributed code that is malicious or inappropriate in any
way, please report that link to LaunchKey immediately and we will investigate the claim. Submit any issue to
LaunchKey support at https://launchkey.com./support.