This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LaunchKey.authorized?(auth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api.is_authorized(auth_request, auth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LaunchKey.create_whitelabel_user(identifier) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response = api.create_whitelabel_user("identifier") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var whiteLabelUser = client.CreateWhiteLabelUser("identifier"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
WhiteLabelUserCreateResult result = | |
authenticationManager.createWhiteLabelUser(myUniqueUserIdentifier); | |
} | |
catch(AuthenticationException e) { | |
//error handling | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$client->auth()->deOrbit("AuthRequestID"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$user = $client->whiteLabel()->createUser("PermanentUniqueIdentifier"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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); | |
} | |
} | |
); |
NewerOlder