Skip to content

Instantly share code, notes, and snippets.

Avatar

LaunchKey Documentation Examples lkdocs

View GitHub Profile
@lkdocs
lkdocs / Python Auth Flow: Auth Callback Example.py
Created Apr 17, 2015
Python Auth Flow: Auth Callback Example
View Python Auth Flow: Auth Callback Example.py
api.is_authorized(auth_request, auth)
@lkdocs
lkdocs / Ruby: Create White Label User.rb
Created Apr 3, 2015
Ruby: Create White Label User
View Ruby: Create White Label User.rb
LaunchKey.create_whitelabel_user(identifier)
@lkdocs
lkdocs / Python Auth Flow:Create White Label User.py
Created Apr 3, 2015
Python Auth Flow:Create White Label User
View Python Auth Flow:Create White Label User.py
response = api.create_whitelabel_user("identifier")
@lkdocs
lkdocs / .NET: Create White Label User Example.cs
Created Apr 2, 2015
.NET: Create White Label User Example
View .NET: Create White Label User Example.cs
var whiteLabelUser = client.CreateWhiteLabelUser("identifier");
@lkdocs
lkdocs / Java SDK: Create White Label User Example.java
Last active Aug 29, 2015
Java SDK: Create White Label User Example
View Java SDK: Create White Label User Example.java
try {
WhiteLabelUserCreateResult result =
authenticationManager.createWhiteLabelUser(myUniqueUserIdentifier);
}
catch(AuthenticationException e) {
//error handling
}
@lkdocs
lkdocs / LaunchKey PHP SDK - DeOrbit.php
Last active Aug 29, 2015
LaunchKey PHP SDK - DeOrbit
View LaunchKey PHP SDK - DeOrbit.php
$client->auth()->deOrbit("AuthRequestID");
@lkdocs
lkdocs / LaunchKey PHP SDK - Add Logger - Monolog.php
Created Apr 1, 2015
LaunchKey PHP SDK - Add Logger - Monolog
View LaunchKey PHP SDK - Add Logger - Monolog.php
$logger = new \Monolog\Logger('launchkey', new \Monolog\Handler\ErrorLogHandler());
$config = new \LaunchKey\SDK\Config();
$config->setAppKey("1234567890")
->setSecretKey("supersecretandwayrandomsecretkey")
->setPrivateKeyLocation("/usr/local/etc/launchkey-app-private-key.pem")
->setLogger($logger);
$client = \LaunchKey\SDK\Client::factory($config);
@lkdocs
lkdocs / LaunchKey PHP SDK - Create White Label User.php
Created Apr 1, 2015
LaunchKey PHP SDK - Create White Label User
View LaunchKey PHP SDK - Create White Label User.php
$user = $client->whiteLabel()->createUser("PermanentUniqueIdentifier");
@lkdocs
lkdocs / LaunchKey PHP SDK - Event Subscription.php
Last active Aug 29, 2015
LaunchKey PHP SDK - Event Subscription
View LaunchKey PHP SDK - Event Subscription.php
$client->eventDispatcher()->subscribe(
\LaunchKey\SDK\Event\AuthResponseEvent::NAME,
function (authResponseEvent) {
$authorized = $authResponseEvent->getAuthResponse()->isAuthorized();
if ($authorized !== null) {
$stat = "login." . $authorized ? 'authorized' : 'denied';
StatsD::getInstance()->increment($stat);
}
}
);
You can’t perform that action at this time.