You are here

function oauth2_login_help in OAuth2 Login 7.2

Same name and namespace in other branches
  1. 7 oauth2_login.module \oauth2_login_help()

Implements hook_help().

File

./oauth2_login.module, line 10
Provides OAuth2 Login functionality.

Code

function oauth2_login_help($path, $arg) {
  $help = '';
  switch ($path) {
    case 'admin/config/people/oauth2_login':
      $oauth2_server = variable_get('oauth2_login_oauth2_server', '');
      $help = t('<p>The module OAuth2 Login is used to allow the users
of another Drupal site to login to your site. This is done through OAuth2
authentication. On login the users are redirected to the login of the other
Drupal site, and after they login there, they are redirected back to this
site.</p>
<p>For this to work, the module
<a href="https://github.com/dashohoxha/oauth2_loginprovider" target="_blank">
OAuth2 Login Provider</a> must be installed on the other site, and a client
that corresponds to this site must be registered there (on the path
<a href="!oauth2_clients_config" target="_blank">admin/structure/oauth2-servers/manage/oauth2/clients</a>).
On that client, you must set the <strong>Redirect URI</strong> to:
<strong>!redirect_uri</strong></p>
<p>On the configuration of OAuth2 Login you should put the
<strong>Server URL</strong> (base url) of the remote site,
and the <strong>Client ID</strong> and <strong>Client secret</strong>
of the registered client.</p>
<p>To customize the details of login, play with the
<a href="hybridauth" target="_blank">settings of HybridAuth</a></p>', [
        '!oauth2_clients_config' => $oauth2_server . '/admin/structure/oauth2-servers/manage/oauth2/clients',
        '!redirect_uri' => url('oauth2/authorized', [
          'absolute' => TRUE,
        ]),
      ]);
      break;
  }
  return $help;
}