Method | Description | |
---|---|---|
__construct ( array | object | null $oldSettings = null ) | Initializes the SP SAML instance. | |
buildRequestSignature ( string $samlRequest, string $relayState, string $signAlgorithm = XMLSecurityKey::RSA_SHA1 ) : string | Generates the Signature for a SAML Request | |
buildResponseSignature ( string $samlResponse, string $relayState, string $signAlgorithm = XMLSecurityKey::RSA_SHA1 ) : string | Generates the Signature for a SAML Response | |
getAttribute ( string $name ) : array | null | Returns the requested SAML attribute | |
getAttributes ( ) : array | Returns the set of SAML attributes. | |
getErrors ( ) : array | Returns if there were any error | |
getLastErrorReason ( ) : string | Returns the reason for the last error | |
getLastRequestID ( ) : string | Gets the ID of the last AuthNRequest or LogoutRequest generated by the Service Provider. | |
getNameId ( ) : string | Returns the nameID | |
getNameIdFormat ( ) : string | Returns the nameID Format | |
getSLOurl ( ) : string | Gets the SLO url. | |
getSSOurl ( ) : string | Gets the SSO url. | |
getSessionExpiration ( ) : DateTime | null | Returns the SessionNotOnOrAfter | |
getSessionIndex ( ) : string | null | Returns the SessionIndex | |
getSettings ( ) : OneLogin_Saml2_Settings | Returns the settings info | |
isAuthenticated ( ) : boolean | Checks if the user is authenticated or not. | |
login ( string | null $returnTo = null, array $parameters = [], boolean $forceAuthn = false, boolean $isPassive = false, boolean $stay = false, boolean $setNameIdPolicy = true ) : If | Initiates the SSO process. | |
logout ( string | null $returnTo = null, array $parameters = [], string | null $nameId = null, string | null $sessionIndex = null, boolean $stay = false, string | null $nameIdFormat = null ) : If | Initiates the SLO process. | |
processResponse ( string | null $requestId = null ) | Process the SAML Response sent by the IdP. | |
processSLO ( boolean $keepLocalSession = false, string | null $requestId = null, boolean $retrieveParametersFromServer = false, callable $cbDeleteSession = null, boolean $stay = false ) : string | void | Process the SAML Logout Response / Logout Request sent by the IdP. | |
redirectTo ( string $url = '', array $parameters = [], boolean $stay = false ) | Redirects the user to the url past by parameter or to the url that we defined in our SSO Request. | |
setStrict ( boolean $value ) : array | Set the strict mode active/disable |
public getAttributes ( ) : array | ||
return | array | Attributes of the user. |
public getLastErrorReason ( ) : string | ||
return | string | Error reason |
public getLastRequestID ( ) : string | ||
return | string | The ID of the Request SAML message. |
public getNameIdFormat ( ) : string | ||
return | string | The nameID Format of the assertion |
public getSessionExpiration ( ) : DateTime | null | ||
return | DateTime | null | The SessionNotOnOrAfter of the assertion |
public getSessionIndex ( ) : string | null | ||
return | string | null | The SessionIndex of the assertion |
public getSettings ( ) : OneLogin_Saml2_Settings | ||
return | OneLogin_Saml2_Settings | The settings data. |
public isAuthenticated ( ) : boolean | ||
return | boolean | True if the user is authenticated |
public login ( string | null $returnTo = null, array $parameters = [], boolean $forceAuthn = false, boolean $isPassive = false, boolean $stay = false, boolean $setNameIdPolicy = true ) : If | ||
$returnTo | string | null | The target URL the user should be returned to after login. |
$parameters | array | Extra parameters to be added to the GET |
$forceAuthn | boolean | When true the AuthNReuqest will set the ForceAuthn='true' |
$isPassive | boolean | When true the AuthNReuqest will set the Ispassive='true' |
$stay | boolean | True if we want to stay (returns the url string) False to redirect |
$setNameIdPolicy | boolean | When true the AuthNReuqest will set a nameIdPolicy element |
return | If | $stay is True, it return a string with the SLO URL + LogoutRequest + parameters |
public logout ( string | null $returnTo = null, array $parameters = [], string | null $nameId = null, string | null $sessionIndex = null, boolean $stay = false, string | null $nameIdFormat = null ) : If | ||
$returnTo | string | null | The target URL the user should be returned to after logout. |
$parameters | array | Extra parameters to be added to the GET |
$nameId | string | null | The NameID that will be set in the LogoutRequest. |
$sessionIndex | string | null | The SessionIndex (taken from the SAML Response in the SSO process). |
$stay | boolean | True if we want to stay (returns the url string) False to redirect |
$nameIdFormat | string | null | The NameID Format will be set in the LogoutRequest. |
return | If | $stay is True, it return a string with the SLO URL + LogoutRequest + parameters |
public processResponse ( string | null $requestId = null ) | ||
$requestId | string | null | The ID of the AuthNRequest sent by this SP to the IdP |
public processSLO ( boolean $keepLocalSession = false, string | null $requestId = null, boolean $retrieveParametersFromServer = false, callable $cbDeleteSession = null, boolean $stay = false ) : string | void | ||
$keepLocalSession | boolean | When false will destroy the local session, otherwise will keep it |
$requestId | string | null | The ID of the LogoutRequest sent by this SP to the IdP |
$retrieveParametersFromServer | boolean | |
$cbDeleteSession | callable | |
$stay | boolean | True if we want to stay (returns the url string) False to redirect |
return | string | void |