PHP Class SimpleSAML_IdP, simplesamlphp

This class implements the various functions used by IdP.
Afficher le fichier Open project: simplesamlphp/simplesamlphp Class Usage Examples

Méthodes publiques

Méthode Description
addAssociation ( array $association ) Add an SP association.
doLogoutRedirect ( string $url ) Log out, then redirect to a URL.
finishLogout ( array &$state ) Finish the logout operation.
finishLogoutRedirect ( SimpleSAML_IdP $idp, array $state ) Redirect to a URL after logout.
getAssociations ( ) : array Retrieve list of SP associations.
getById ( string $id ) : SimpleSAML_IdP Retrieve an IdP by ID.
getByState ( array &$state ) : SimpleSAML_IdP Retrieve the IdP "owning" the state.
getConfig ( ) : SimpleSAML_Configuration Retrieve the configuration for this IdP.
getId ( ) : string Retrieve the ID of this IdP.
getLogoutHandler ( ) : SimpleSAML\IdP\LogoutHandlerInterface Find the logout handler of this IdP.
getSPName ( string $assocId ) : array | null Get SP name.
handleAuthenticationRequest ( array &$state ) Process authentication requests.
handleLogoutRequest ( array &$state, string | null $assocId ) Process a logout request.
handleLogoutResponse ( string $assocId, string | null $relayState, SimpleSAML_Error_Exception $error = null ) Process a logout response.
isAuthenticated ( ) : boolean Is the current user authenticated?
postAuth ( array $state ) The user is authenticated.
postAuthProc ( array $state ) Called after authproc has run.
terminateAssociation ( string $assocId ) Remove an SP association.

Private Methods

Méthode Description
__construct ( string $id ) Initialize an IdP.
authenticate ( array &$state ) Authenticate the user.
reauthenticate ( array &$state ) Re-authenticate the user.

Method Details

addAssociation() public méthode

Add an SP association.
public addAssociation ( array $association )
$association array The SP association.

doLogoutRedirect() public méthode

This function never returns.
public doLogoutRedirect ( string $url )
$url string The URL the user should be returned to after logout.

finishLogout() public méthode

This function will never return.
public finishLogout ( array &$state )
$state array

finishLogoutRedirect() public static méthode

This function never returns.
public static finishLogoutRedirect ( SimpleSAML_IdP $idp, array $state )
$idp SimpleSAML_IdP Deprecated. Will be removed.
$state array

getAssociations() public méthode

Retrieve list of SP associations.
public getAssociations ( ) : array
Résultat array List of SP associations.

getById() public static méthode

Retrieve an IdP by ID.
public static getById ( string $id ) : SimpleSAML_IdP
$id string The identifier of the IdP.
Résultat SimpleSAML_IdP The IdP.

getByState() public static méthode

Retrieve the IdP "owning" the state.
public static getByState ( array &$state ) : SimpleSAML_IdP
$state array
Résultat SimpleSAML_IdP The IdP.

getConfig() public méthode

Retrieve the configuration for this IdP.
public getConfig ( ) : SimpleSAML_Configuration
Résultat SimpleSAML_Configuration The configuration object.

getId() public méthode

Retrieve the ID of this IdP.
public getId ( ) : string
Résultat string The ID of this IdP.

getLogoutHandler() public méthode

Find the logout handler of this IdP.
public getLogoutHandler ( ) : SimpleSAML\IdP\LogoutHandlerInterface
Résultat SimpleSAML\IdP\LogoutHandlerInterface The logout handler class.

getSPName() public méthode

Get SP name.
public getSPName ( string $assocId ) : array | null
$assocId string The association identifier.
Résultat array | null The name of the SP, as an associative array of language => text, or null if this isn't an SP.

handleAuthenticationRequest() public méthode

Process authentication requests.
public handleAuthenticationRequest ( array &$state )
$state array

handleLogoutRequest() public méthode

This function will never return.
public handleLogoutRequest ( array &$state, string | null $assocId )
$state array
$assocId string | null The association we received the logout request from, or null if there was no association.

handleLogoutResponse() public méthode

This function will never return.
public handleLogoutResponse ( string $assocId, string | null $relayState, SimpleSAML_Error_Exception $error = null )
$assocId string The association that is terminated.
$relayState string | null The RelayState from the start of the logout.
$error SimpleSAML_Error_Exception The error that occurred during session termination (if any).

isAuthenticated() public méthode

Is the current user authenticated?
public isAuthenticated ( ) : boolean
Résultat boolean True if the user is authenticated, false otherwise.

postAuth() public static méthode

The user is authenticated.
public static postAuth ( array $state )
$state array The authentication request state array.

postAuthProc() public static méthode

Called after authproc has run.
public static postAuthProc ( array $state )
$state array The authentication request state array.

terminateAssociation() public méthode

Remove an SP association.
public terminateAssociation ( string $assocId )
$assocId string The association id.