PHP Класс OneLogin_Saml2_Settings

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( array | object | null $settings = null, $spValidationOnly = false ) Initializes the settings: - Sets the paths of the different folders - Loads settings info from settings file or array/object provided
checkCompressionSettings ( array $settings ) : array Checks the compression settings info.
checkIdPSettings ( array $settings ) : array Checks the IdP settings info.
checkSPCerts ( ) : boolean Checks if the x509 certs of the SP exists and are valid.
checkSPSettings ( array $settings ) : array Checks the SP settings info.
checkSettings ( array $settings ) : array Checks the settings info.
formatIdPCert ( ) Formats the IdP cert.
formatSPCert ( ) Formats the SP cert.
formatSPKey ( ) Formats the SP private key.
getBasePath ( ) : string Returns base path.
getBaseURL ( ) : null | string Returns the baseurl set on the settings if any.
getCertPath ( ) : string Returns cert path.
getConfigPath ( ) : string Returns config path.
getContacts ( ) : array Gets contact data.
getErrors ( ) : array Returns an array with the errors, the array is empty when the settings is ok.
getExtLibPath ( ) : string Returns external lib path.
getIdPData ( ) : array Gets the IdP data.
getLibPath ( ) : string Returns lib path.
getOrganization ( ) : array Gets organization data.
getSPData ( ) : array Gets the SP data.
getSPMetadata ( ) : string Gets the SP metadata. The XML representation.
getSPcert ( ) : string Returns the x509 public cert of the SP.
getSPkey ( ) : string Returns the x509 private key of the SP.
getSchemasPath ( ) : string Returns schema path.
getSecurityData ( ) : array Gets security data.
isDebugActive ( ) : boolean Returns if the debug is active.
isStrict ( ) : boolean Returns if the 'strict' mode is active.
setBaseURL ( $baseurl ) Set a baseurl value.
setIdPCert ( $cert ) Sets the IdP certificate.
setStrict ( boolean $value ) Activates or deactivates the strict mode.
shouldCompressRequests ( ) : boolean Should SAML requests be compressed?
shouldCompressResponses ( ) : boolean Should SAML responses be compressed?
validateMetadata ( string $xml ) : Array Validates an XML SP Metadata.

Приватные методы

Метод Описание
_addDefaultValues ( ) Add default values if the settings info is not complete
_loadPaths ( ) Sets the paths of the different folders
_loadSettingsFromArray ( array $settings ) : boolean Loads settings info from a settings Array
_loadSettingsFromFile ( ) : boolean Loads settings info from the settings file

Описание методов

__construct() публичный Метод

Initializes the settings: - Sets the paths of the different folders - Loads settings info from settings file or array/object provided
public __construct ( array | object | null $settings = null, $spValidationOnly = false )
$settings array | object | null SAML Toolkit Settings

checkCompressionSettings() публичный Метод

Checks the compression settings info.
public checkCompressionSettings ( array $settings ) : array
$settings array Array with settings data
Результат array $errors Errors found on the settings data

checkIdPSettings() публичный Метод

Checks the IdP settings info.
public checkIdPSettings ( array $settings ) : array
$settings array Array with settings data
Результат array $errors Errors found on the IdP settings data

checkSPCerts() публичный Метод

Checks if the x509 certs of the SP exists and are valid.
public checkSPCerts ( ) : boolean
Результат boolean

checkSPSettings() публичный Метод

Checks the SP settings info.
public checkSPSettings ( array $settings ) : array
$settings array Array with settings data
Результат array $errors Errors found on the SP settings data

checkSettings() публичный Метод

Checks the settings info.
public checkSettings ( array $settings ) : array
$settings array Array with settings data
Результат array $errors Errors found on the settings data

formatIdPCert() публичный Метод

Formats the IdP cert.
public formatIdPCert ( )

formatSPCert() публичный Метод

Formats the SP cert.
public formatSPCert ( )

formatSPKey() публичный Метод

Formats the SP private key.
public formatSPKey ( )

getBasePath() публичный Метод

Returns base path.
public getBasePath ( ) : string
Результат string The base toolkit folder path

getBaseURL() публичный Метод

Returns the baseurl set on the settings if any.
public getBaseURL ( ) : null | string
Результат null | string The baseurl

getCertPath() публичный Метод

Returns cert path.
public getCertPath ( ) : string
Результат string The cert folder path

getConfigPath() публичный Метод

Returns config path.
public getConfigPath ( ) : string
Результат string The config folder path

getContacts() публичный Метод

Gets contact data.
public getContacts ( ) : array
Результат array SP info

getErrors() публичный Метод

Returns an array with the errors, the array is empty when the settings is ok.
public getErrors ( ) : array
Результат array Errors

getExtLibPath() публичный Метод

Returns external lib path.
public getExtLibPath ( ) : string
Результат string The external library folder path

getIdPData() публичный Метод

Gets the IdP data.
public getIdPData ( ) : array
Результат array IdP info

getLibPath() публичный Метод

Returns lib path.
public getLibPath ( ) : string
Результат string The library folder path

getOrganization() публичный Метод

Gets organization data.
public getOrganization ( ) : array
Результат array SP info

getSPData() публичный Метод

Gets the SP data.
public getSPData ( ) : array
Результат array SP info

getSPMetadata() публичный Метод

Gets the SP metadata. The XML representation.
public getSPMetadata ( ) : string
Результат string SP metadata (xml)

getSPcert() публичный Метод

Returns the x509 public cert of the SP.
public getSPcert ( ) : string
Результат string SP public cert

getSPkey() публичный Метод

Returns the x509 private key of the SP.
public getSPkey ( ) : string
Результат string SP private key

getSchemasPath() публичный Метод

Returns schema path.
public getSchemasPath ( ) : string
Результат string The external library folder path

getSecurityData() публичный Метод

Gets security data.
public getSecurityData ( ) : array
Результат array SP info

isDebugActive() публичный Метод

Returns if the debug is active.
public isDebugActive ( ) : boolean
Результат boolean Debug parameter

isStrict() публичный Метод

Returns if the 'strict' mode is active.
public isStrict ( ) : boolean
Результат boolean Strict parameter

setBaseURL() публичный Метод

Set a baseurl value.
public setBaseURL ( $baseurl )

setIdPCert() публичный Метод

Sets the IdP certificate.
public setIdPCert ( $cert )

setStrict() публичный Метод

Activates or deactivates the strict mode.
public setStrict ( boolean $value )
$value boolean Strict parameter

shouldCompressRequests() публичный Метод

Should SAML requests be compressed?
public shouldCompressRequests ( ) : boolean
Результат boolean Yes/No as True/False

shouldCompressResponses() публичный Метод

Should SAML responses be compressed?
public shouldCompressResponses ( ) : boolean
Результат boolean Yes/No as True/False

validateMetadata() публичный Метод

Validates an XML SP Metadata.
public validateMetadata ( string $xml ) : Array
$xml string Metadata's XML that will be validate
Результат Array The list of found errors