function rocket_chat_oauth_login_default_oauth2_server in Rocket.Chat 7.2
Same name and namespace in other branches
- 7 modules/rocket_chat_oauth_login/rocket_chat_oauth_login.module \rocket_chat_oauth_login_default_oauth2_server()
Implements hook_default_oauth2_server().
File
- modules/
rocket_chat_oauth_login/ rocket_chat_oauth_login.module, line 144 - Code for the Rocket Chat oAuth Login feature.
Code
function rocket_chat_oauth_login_default_oauth2_server() {
$items = array();
$items['rocket_chat_oAuth_login'] = entity_import('oauth2_server', '{
"name" : "rocket_chat_oAuth_login",
"label" : "Rocket.Chat+",
"settings" : {
"enforce_state" : true,
"default_scope" : "",
"allow_implicit" : 0,
"use_openid_connect" : 1,
"use_crypto_tokens" : 0,
"grant_types" : {
"authorization_code" : "authorization_code",
"refresh_token" : "refresh_token",
"client_credentials" : 0,
"urn:ietf:params:oauth:grant-type:jwt-bearer" : 0,
"password" : 0
},
"always_issue_new_refresh_token" : 1,
"unset_refresh_token_after_use" : 1,
"access_lifetime" : "3600",
"id_lifetime" : "3600",
"refresh_token_lifetime" : "1209600",
"require_exact_redirect_uri" : 1
},
"rdf_mapping" : [],
"scopes" : [
{
"name" : "openid",
"description" : "Let Rocket.Chat+ know who you are on this Drupal",
"rdf_mapping" : []
},
{
"name" : "offline_access",
"description" : "Can Rocket.Chat+ access the API when you\\u0027re not present.",
"rdf_mapping" : []
},
{
"name" : "email",
"description" : "Let Rocket.Chat+ know your email address. (needed for account matching)",
"rdf_mapping" : []
},
{
"name" : "profile",
"description" : "Let Rocket.Chat+ know your basic account information.",
"rdf_mapping" : []
}
]
}');
return $items;
}