Skip to content

Instantly share code, notes, and snippets.

View lkdocs's full-sized avatar

LaunchKey Documentation Examples lkdocs

View GitHub Profile
public class LaunchKeyResponse
{
public bool Successful { get; set; }
public int StatusCode { get; set; }
public string Message { get; set; }
public string MessageCode { get; set; }
}
IsAuthorizedResponse response = await LKAuthenticationManager.Instance.isAuthorized(_authRequest) as IsAuthorizedResponse;
if (response.Authorized)
{
// still authorized
}
public void authorizeSuccessCallback(string userHash, string authRequest, string appPins, string deviceId)
{
// Success
}
public void authorizeFailureCallback(string errorMessage, string errorCode)
{
// Failure
}
LKAuthenticationManager.Instance.authorize(username, authorizeSuccessCallback, authorizeFailureCallback);
using LaunchKeyManager;
LKAuthenticationManager.Instance.init(appKey, secretKey, privateKey);
class AssociationUriMapper : UriMapperBase
{
private string tempUri;
public override Uri MapUri(Uri uri)
{
tempUri = System.Net.HttpUtility.UrlDecode(uri.ToString());
if (tempUri.Contains("lk<appKey>:response"))
{
RootFrame.UriMapper = new AssociationUriMapper();
<Tasks>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" ActivationPolicy="Resume" />
</Tasks>
<Extensions>
<Protocol Name="lk1000000000" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
</Extensions>
LKOAuthManager.getInstance().logout(accessToken, new LKOAuthManager.LKAuthenticationManagerAuthorizationCallback() {
@Override
public void wasSuccess(Boolean authorized) {
}
@Override
public void wasFailure(String errorMessage, String errorCode) {
}
});