| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/enoikio/modules/externalauth/src/ |
Upload File : |
<?php
namespace Drupal\externalauth;
use Drupal\user\UserInterface;
/**
* Interface AuthmapInterface.
*
* @package Drupal\externalauth
*/
interface AuthmapInterface {
/**
* Save an external authname for a given Drupal user.
*
* @param \Drupal\user\UserInterface $account
* The Drupal user account.
* @param string $provider
* The name of the service providing external authentication.
* @param string $authname
* The unique, external authentication name provided by authentication
* provider.
* @param mixed $data
* Optional extra (serialized) data to store with the authname.
*/
public function save(UserInterface $account, $provider, $authname, $data = NULL);
/**
* Get the external authname for a given user ID.
*
* @param int $uid
* The Drupal user ID.
* @param string $provider
* The name of the service providing external authentication.
*
* @return string
* The external authname / ID.
*/
public function get($uid, $provider);
/**
* Get the external authname & extra data for a given user ID.
*
* @param int $uid
* The Drupal user ID.
* @param string $provider
* The name of the service providing external authentication.
*
* @return array
* An array with authname & data values.
*/
public function getAuthData($uid, $provider);
/**
* Get all external authnames for a given user ID.
*
* @param int $uid
* The Drupal user ID.
*
* @return array
* An array of external authnames / IDs for the given user ID, keyed by
* provider name.
*/
public function getAll($uid);
/**
* Get a Drupal user ID based on an authname.
*
* The authname will be provided by an authentication provider.
*
* @param string $authname
* The external authname as provided by the authentication provider.
* @param string $provider
* The name of the service providing external authentication.
*
* @return int|bool
* The Drupal user ID or FALSE.
*/
public function getUid($authname, $provider);
/**
* Delete authmap entries for a given Drupal user ID.
*
* Deletion will be restricted to the specified provider, if passed.
*
* @param int $uid
* The Drupal user ID.
* @param string $provider
* (optional) The name of the service providing external authentication.
*/
public function delete($uid, $provider = NULL);
/**
* Delete all authmap entries for a given provider.
*
* @param string $provider
* The name of the service providing external authentication.
*/
public function deleteProvider($provider);
}