Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @TODO
- * This is an example code.
- * Please write similar code using your mvc framework (if you are using any) and implement your own logic
- */
- require __DIR__ . "/../../lib/vendor/autoload.php";
- use Genetsis\Identity;
- try {
- Identity::init();
- } catch (Exception $e) {
- echo $e->getMessage() . "\n" . $e->getTraceAsString() ;
- die();
- }
- $error = $_GET['error'];
- $uid = $_GET['uid']; // this parameter is only provided in specific DruID flows
- $gohome = true;
- if (!$error) {
- $code = $_GET['code'];
- if (!Identity::isConnected() && (isset($code) || (trim($code) != ''))) {
- Identity::authorizeUser($code);
- }
- } else {
- if ('user_cancel' != $error) {
- $error_description = $_GET['error_description'];
- echo $error . " -> " . $error_description;
- $gohome = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement