Skip to content

Instantly share code, notes, and snippets.

View lkdocs's full-sized avatar

LaunchKey Documentation Examples lkdocs

View GitHub Profile
api.is_authorized(auth_request, auth_response['auth'])
<?php
$launchkey->auth()->getStatus("authRequestId");
?>
<?php
$launchkey->auth()->deOrbit("AuthRequestID");
?>
<?php
$response = $launchkey->auth()->handleCallback($_GET);
?>
api.deorbit(deorbit, signature)
# Include Ruby library
require 'launchkey'
LaunchKey.configure do |config|
config.domain = 'http://yourdomain.tld'
config.app_key = 1234567890
config.secret_key = 'SECRET_KEY'
config.keypair = File.read('path/to/rsa-keypair.pem')
config.passphrase = 'PRIVATE_KEY_PASSPHRASE'
end
auth_request = LaunchKey.authorize('username')
auth_response = LaunchKey.poll_request(auth_request)
LaunchKey.authorized?(auth_response['auth'])