OneLogin_Saml2_Settings

Configuration of the OneLogin PHP Toolkit

Methods

Initializes the settings: - Sets the paths of the different folders - Loads settings info from settings file or array/object provided

__construct(array|object $settings = null) 
exceptions

Throws error exception if any settings parameter is invalid

Arguments

$settings

array|object

SAML Toolkit Settings

Sets the paths of the different folders

_loadPaths() 

Returns base path.

getBasePath() : string

Response

string

The base toolkit folder path

Returns cert path.

getCertPath() : string

Response

string

The cert folder path

Returns config path.

getConfigPath() : string

Response

string

The config folder path

Returns lib path.

getLibPath() : string

Response

string

The library folder path

Returns external lib path.

getExtLibPath() : string

Response

string

The external library folder path

Returns schema path.

getSchemasPath() : string

Response

string

The external library folder path

Loads settings info from a settings Array

_loadSettingsFromArray(array $settings) : boolean

Arguments

$settings

array

SAML Toolkit Settings

Response

boolean

True if the settings info is valid

Loads settings info from the settings file

_loadSettingsFromFile() : boolean

Response

boolean

True if the settings info is valid

Add default values if the settings info is not complete

_addDefaultValues() 

Checks the settings info.

checkSettings(array $settings) : array

Arguments

$settings

array

Array with settings data

Response

array

$errors Errors found on the settings data

Checks if the x509 certs of the SP exists and are valid.

checkSPCerts() : boolean

Response

boolean

Returns the x509 private key of the SP.

getSPkey() : string

Response

string

SP private key

Returns the x509 public cert of the SP.

getSPcert() : string

Response

string

SP public cert

Gets the IdP data.

getIdPData() : array

Response

array

IdP info

Gets the SP data.

getSPData() : array

Response

array

SP info

Gets security data.

getSecurityData() : array

Response

array

SP info

Gets contact data.

getContacts() : array

Response

array

SP info

Gets organization data.

getOrganization() : array

Response

array

SP info

Formats the IdP cert.

formatIdPCert() 

Formats the SP private key.

formatSPKey() 

Formats the SP cert.

formatSPCert() 

Returns an array with the errors, the array is empty when the settings is ok.

getErrors() : array

Response

array

Errors

Activates or deactivates the strict mode.

setStrict(boolean $value) 

Arguments

$value

boolean

Strict parameter

Returns if the 'strict' mode is active.

isStrict() : boolean

Response

boolean

Strict parameter

Returns if the debug is active.

isDebugActive() : boolean

Response

boolean

Debug parameter

Properties

List of paths.

_paths : array
var

Type(s)

array

Strict. If active, PHP Toolkit will reject unsigned or unencrypted messages if it expects them signed or encrypted. If not, the messages will be accepted and some security issues will be also relaxed.

_strict : boolean
var

Type(s)

boolean

Activate debug mode

_debug : boolean
var

Type(s)

boolean

SP data.

_sp : array
var

Type(s)

array

IdP data.

_idp : array
var

Type(s)

array

Security Info related to the SP.

_security : array
var

Type(s)

array

Setting contacts.

_contacts : array
var

Type(s)

array

Setting organization.

_organization : array
var

Type(s)

array

Setting errors.

_errors : array
var

Type(s)

array