PHP Class Gdn_Authenticator, vanilla

Inheritance: extends Gdn_Pluggable
Afficher le fichier Open project: vanilla/vanilla Class Usage Examples

Méthodes publiques

Свойство Type Description
$_DataHooks array

Protected Properties

Свойство Type Description
$_AuthenticationSchemeAlias Alias of the authentication scheme to use, e.g. "password" or "openid".
$_DataSource null
$_DataSourceType string

Méthodes publiques

Méthode Description
__construct ( )
authenticate ( ) Returns the unique id assigned to the user in the database.
authorizeToken ( $TokenKey ) : boolean
clearNonces ( $TokenKey )
createToken ( $TokenType, $ProviderKey, null $UserKey = null, boolean $Authorized = false ) : array | boolean
currentStep ( )
dataSourceType ( ) : string
deAuthenticate ( )
deleteToken ( $ProviderKey, $UserKey, $TokenType )
failedResponse ( ) What to do if the entry/auth/* page is triggered but login is denied or fails.
fetchData ( $DataSource, array $DirectSupplied = [] )
getAuthenticationSchemeAlias ( ) : string
getNonce ( ) : array | boolean | stdClass
getProvider ( null $ProviderKey = null, boolean $Force = false ) : array | boolean | stdClass
getProviderKey ( ) : boolean
getProviderSecret ( ) : boolean
getProviderUrl ( ) : boolean
getProviderValue ( $Key, boolean $Default = false ) : boolean
getToken ( ) : array | boolean | stdClass
getURL ( $URLType ) : mixed Get one of the three Forwarding URLs (Registration, SignIn, SignOut).
getValue ( $Key, boolean $Default = false ) : boolean
hookDataField ( $InternalFieldName, $DataFieldName, boolean $DataFieldRequired = true )
loginResponse ( ) What to do if entry/auth/* is called while the user is logged out.
logoutResponse ( ) What to do if the entry/leave/* page is triggered for a user that is logged in and successfully logs out.
lookupNonce ( $TokenKey, null $Nonce = null ) : boolean
lookupToken ( $ProviderKey, $UserKey, null $TokenType = null ) : array | boolean | stdClass
partialResponse ( ) What to do after part 1 of a 2 part authentication process.
repeatResponse ( ) What to do if the entry/auth/* page is triggered for a user that is already logged in.
requireLogoutTransientKey ( ) : boolean
setIdentity ( $UserID, boolean $Persist = true )
setNonce ( $TokenKey, $Nonce, null $Timestamp = null ) : boolean
successResponse ( ) What to do after authentication has succeeded.
wakeUp ( )

Méthodes protégées

Méthode Description
_checkHookedFields ( ) : string

Method Details

__construct() public méthode

public __construct ( )

_checkHookedFields() protected méthode

protected _checkHookedFields ( ) : string
Résultat string

authenticate() abstract public méthode

This method should return 0 if the username/password combination were not found, or -1 if the user does not have permission to sign in.
abstract public authenticate ( )

authorizeToken() public méthode

public authorizeToken ( $TokenKey ) : boolean
$TokenKey
Résultat boolean

clearNonces() public méthode

public clearNonces ( $TokenKey )
$TokenKey

createToken() public méthode

public createToken ( $TokenType, $ProviderKey, null $UserKey = null, boolean $Authorized = false ) : array | boolean
$TokenType
$ProviderKey
$UserKey null
$Authorized boolean
Résultat array | boolean

currentStep() abstract public méthode

abstract public currentStep ( )

dataSourceType() public méthode

public dataSourceType ( ) : string
Résultat string

deAuthenticate() abstract public méthode

abstract public deAuthenticate ( )

deleteToken() public méthode

public deleteToken ( $ProviderKey, $UserKey, $TokenType )
$ProviderKey
$UserKey
$TokenType

failedResponse() public méthode

What to do if the entry/auth/* page is triggered but login is denied or fails.
public failedResponse ( )

fetchData() public méthode

public fetchData ( $DataSource, array $DirectSupplied = [] )
$DataSource
$DirectSupplied array

getAuthenticationSchemeAlias() public méthode

public getAuthenticationSchemeAlias ( ) : string
Résultat string

getNonce() public méthode

public getNonce ( ) : array | boolean | stdClass
Résultat array | boolean | stdClass

getProvider() public méthode

public getProvider ( null $ProviderKey = null, boolean $Force = false ) : array | boolean | stdClass
$ProviderKey null
$Force boolean
Résultat array | boolean | stdClass

getProviderKey() public méthode

public getProviderKey ( ) : boolean
Résultat boolean

getProviderSecret() public méthode

public getProviderSecret ( ) : boolean
Résultat boolean

getProviderUrl() public méthode

public getProviderUrl ( ) : boolean
Résultat boolean

getProviderValue() public méthode

public getProviderValue ( $Key, boolean $Default = false ) : boolean
$Key
$Default boolean
Résultat boolean

getToken() public méthode

public getToken ( ) : array | boolean | stdClass
Résultat array | boolean | stdClass

getURL() abstract public méthode

Get one of the three Forwarding URLs (Registration, SignIn, SignOut).
abstract public getURL ( $URLType ) : mixed
$URLType
Résultat mixed

getValue() public méthode

public getValue ( $Key, boolean $Default = false ) : boolean
$Key
$Default boolean
Résultat boolean

hookDataField() public méthode

public hookDataField ( $InternalFieldName, $DataFieldName, boolean $DataFieldRequired = true )
$InternalFieldName
$DataFieldName
$DataFieldRequired boolean

loginResponse() abstract public méthode

Should normally be REACT_RENDER.
abstract public loginResponse ( )

logoutResponse() public méthode

What to do if the entry/leave/* page is triggered for a user that is logged in and successfully logs out.
public logoutResponse ( )

lookupNonce() public méthode

public lookupNonce ( $TokenKey, null $Nonce = null ) : boolean
$TokenKey
$Nonce null
Résultat boolean

lookupToken() public méthode

public lookupToken ( $ProviderKey, $UserKey, null $TokenType = null ) : array | boolean | stdClass
$ProviderKey
$UserKey
$TokenType null
Résultat array | boolean | stdClass

partialResponse() abstract public méthode

This is used in conjunction with OAauth/OpenID type authentication schemes.
abstract public partialResponse ( )

repeatResponse() abstract public méthode

What to do if the entry/auth/* page is triggered for a user that is already logged in.
abstract public repeatResponse ( )

requireLogoutTransientKey() public méthode

public requireLogoutTransientKey ( ) : boolean
Résultat boolean

setIdentity() public méthode

public setIdentity ( $UserID, boolean $Persist = true )
$UserID
$Persist boolean

setNonce() public méthode

public setNonce ( $TokenKey, $Nonce, null $Timestamp = null ) : boolean
$TokenKey
$Nonce
$Timestamp null
Résultat boolean

successResponse() abstract public méthode

What to do after authentication has succeeded.
abstract public successResponse ( )

wakeUp() abstract public méthode

abstract public wakeUp ( )

Property Details

$_AuthenticationSchemeAlias protected_oe property

Alias of the authentication scheme to use, e.g. "password" or "openid".
protected $_AuthenticationSchemeAlias

$_DataHooks public_oe property

public array $_DataHooks
Résultat array

$_DataSource protected_oe property

protected null $_DataSource
Résultat null

$_DataSourceType protected_oe property

protected string $_DataSourceType
Résultat string