annotate core/modules/basic_auth/basic_auth.module @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author |
Chris Cannam |
date |
Thu, 28 Feb 2019 13:11:55 +0000 |
parents |
c75dbcec494b |
children |
12f9dff5fda9 |
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 /**
|
Chris@0
|
4 * @file
|
Chris@0
|
5 * Provides an HTTP Basic authentication provider.
|
Chris@0
|
6 */
|
Chris@0
|
7
|
Chris@0
|
8 use Drupal\Core\Routing\RouteMatchInterface;
|
Chris@0
|
9
|
Chris@0
|
10 /**
|
Chris@0
|
11 * Implements hook_help().
|
Chris@0
|
12 */
|
Chris@0
|
13 function basic_auth_help($route_name, RouteMatchInterface $route_match) {
|
Chris@0
|
14 switch ($route_name) {
|
Chris@0
|
15 case 'help.page.basic_auth':
|
Chris@0
|
16 $output = '';
|
Chris@0
|
17 $output .= '<h3>' . t('About') . '</h3>';
|
Chris@0
|
18 $output .= '<p>' . t('The HTTP Basic Authentication module supplies an <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP Basic authentication</a> provider for web service requests. This authentication provider authenticates requests using the HTTP Basic Authentication username and password, as an alternative to using Drupal\'s standard cookie-based authentication system. It is only useful if your site provides web services configured to use this type of authentication (for instance, the <a href=":rest_help">RESTful Web Services module</a>). For more information, see the <a href=":hba_do">online documentation for the HTTP Basic Authentication module</a>.', [':hba_do' => 'https://www.drupal.org/documentation/modules/basic_auth', ':rest_help' => (\Drupal::moduleHandler()->moduleExists('rest')) ? \Drupal::url('help.page', ['name' => 'rest']) : '#']) . '</p>';
|
Chris@0
|
19 return $output;
|
Chris@0
|
20 }
|
Chris@0
|
21 }
|