- // UI
- if (!empty($_POST['ui'])) {
- $ui = new \OpenID_Extension_UI(\OpenID_Extension::REQUEST);
- $ui->set('mode', 'popup');
- $ui->set('language', 'en-US');
- $authRequest->addExtension($ui);
- }
-
- // OAuth
- if (!empty($_POST['oauth'])) {
- $oauth = new \OpenID_Extension_OAuth(\OpenID_Extension::REQUEST);
- $oauth->set('consumer', $_POST['oauth_consumer_key']);
- $_SESSION['OAuth_consumer_key'] = $_POST['oauth_consumer_key'];
- $_SESSION['OAuth_consumer_secret'] = $_POST['oauth_consumer_secret'];
-
- $oauth->set('scope', $_POST['oauth_scope']);
- $_SESSION['OAuth_scope'] = $_POST['oauth_scope'];
-
- $_SESSION['OAuth_access_token_url'] = $_POST['oauth_access_token_url'];
- $_SESSION['OAuth_access_token_method'] = $_POST['oauth_access_token_method'];
-
- $authRequest->addExtension($oauth);
- }
-