function oauth2_login_get_oauth2_settings in OAuth2 Login 7.2
Same name in this branch
- 7.2 oauth2_login.module \oauth2_login_get_oauth2_settings()
- 7.2 oauth2_login.api.php \oauth2_login_get_oauth2_settings()
Same name and namespace in other branches
- 8 oauth2_login.api.php \oauth2_login_get_oauth2_settings()
Return oauth2 settings.
4 calls to oauth2_login_get_oauth2_settings()
- oauth2_login_get_access_token in ./
oauth2_login.module - Get an access_token, or NULL if there is no valid token.
- oauth2_login_get_access_token in ./
oauth2_login.api.php - Get an access_token, or NULL if there is no valid token.
- oauth2_user_default_wsclient_service in oauth2_user/
wsclient.inc - Implements hook_default_wsclient_service().
- _oauth2_proxy_login in ./
oauth2_login.module - Function for: oauth2/proxy/login.
File
- ./
oauth2_login.api.php, line 74 - The programing interface provided by the module oauth2_login.
Code
function oauth2_login_get_oauth2_settings() {
$server_url = variable_get('oauth2_login_oauth2_server');
$oauth2_settings = [
'auth_flow' => 'server-side',
'authorization_endpoint' => $server_url . '/oauth2/authorize',
'token_endpoint' => $server_url . '/oauth2/token',
'client_id' => variable_get('oauth2_login_client_id'),
'client_secret' => variable_get('oauth2_login_client_secret'),
'redirect_uri' => url('oauth2/authorized', [
'absolute' => TRUE,
]),
'scope' => 'user_profile',
];
return $oauth2_settings;
}