dolibarr 20.0.2
SimpleOpenID Class Reference

Class to manage OpenID. More...

Public Member Functions

 __construct ()
 Constructor.
 
 SetOpenIDServer ($a)
 SetOpenIDServer.
 
 SetTrustRoot ($a)
 SetOpenIDServer.
 
 SetCancelURL ($a)
 SetOpenIDServer.
 
 SetApprovedURL ($a)
 SetApprovedURL.
 
 SetRequiredFields ($a)
 SetRequiredFields.
 
 SetOptionalFields ($a)
 SetOptionalFields.
 
 SetIdentity ($a)
 SetIdentity.
 
 GetIdentity ()
 GetIdentity.
 
 GetError ()
 SetOpenIDServer.
 
 ErrorStore ($code, $desc=null)
 ErrorStore.
 
 IsError ()
 IsError.
 
 splitResponse ($response)
 splitResponse
 
 OpenID_Standarize ($openid_identity=null)
 OpenID_Standarize.
 
 array2url ($arr)
 array2url
 
 FSOCK_Request ($url, $method="GET", $params="")
 FSOCK_Request.
 
 HTML2OpenIDServer ($content)
 HTML2OpenIDServer.
 
 GetOpenIDServer ($url='')
 Get openid server.
 
 GetRedirectURL ()
 GetRedirectURL.
 
 Redirect ()
 Redirect.
 
 validateWithServer ()
 validateWithServer
 
 sendDiscoveryRequestToGetXRDS ($url='')
 Get XRDS response and set possible servers.
 

Detailed Description

Class to manage OpenID.

Definition at line 27 of file openid.class.php.

Member Function Documentation

◆ array2url()

SimpleOpenID::array2url ( $arr)

array2url

Parameters
array$arrAn array
Returns
false|string false if KO, string of url if OK

Definition at line 280 of file openid.class.php.

Referenced by GetRedirectURL().

◆ ErrorStore()

SimpleOpenID::ErrorStore ( $code,
$desc = null )

ErrorStore.

Parameters
string$codeCode
string$descDescription
Returns
void

Definition at line 198 of file openid.class.php.

Referenced by FSOCK_Request(), and GetOpenIDServer().

◆ FSOCK_Request()

SimpleOpenID::FSOCK_Request ( $url,
$method = "GET",
$params = "" )

FSOCK_Request.

Parameters
string$urlURL
string$methodMethod
string$paramsParams
Returns
boolean|void True if success, False if error

Definition at line 302 of file openid.class.php.

References ErrorStore().

◆ GetError()

SimpleOpenID::GetError ( )

SetOpenIDServer.

Returns
array

Definition at line 183 of file openid.class.php.

◆ GetIdentity()

SimpleOpenID::GetIdentity ( )

GetIdentity.

Returns
string

Definition at line 170 of file openid.class.php.

◆ GetOpenIDServer()

SimpleOpenID::GetOpenIDServer ( $url = '')

Get openid server.

Parameters
string$urlUrl to found endpoint
Returns
string|false Endpoint, of false if error

Definition at line 365 of file openid.class.php.

References ErrorStore(), getDolGlobalString(), getURLContent(), HTML2OpenIDServer(), SetIdentity(), and SetOpenIDServer().

◆ GetRedirectURL()

SimpleOpenID::GetRedirectURL ( )

GetRedirectURL.

Returns
string

Definition at line 396 of file openid.class.php.

References array2url().

Referenced by Redirect().

◆ HTML2OpenIDServer()

SimpleOpenID::HTML2OpenIDServer ( $content)

HTML2OpenIDServer.

Parameters
string$contentContent
Returns
array Array of servers

Definition at line 334 of file openid.class.php.

Referenced by GetOpenIDServer().

◆ IsError()

SimpleOpenID::IsError ( )

IsError.

Returns
boolean

Definition at line 215 of file openid.class.php.

◆ OpenID_Standarize()

SimpleOpenID::OpenID_Standarize ( $openid_identity = null)

OpenID_Standarize.

Parameters
string$openid_identityServer
Returns
string

Definition at line 252 of file openid.class.php.

◆ Redirect()

SimpleOpenID::Redirect ( )

Redirect.

Returns
void

Definition at line 422 of file openid.class.php.

References GetRedirectURL().

◆ sendDiscoveryRequestToGetXRDS()

SimpleOpenID::sendDiscoveryRequestToGetXRDS ( $url = '')

Get XRDS response and set possible servers.

Parameters
string$urlUrl of endpoint to request
Returns
string|false First endpoint OpenID server found. False if it failed to found.

Definition at line 489 of file openid.class.php.

◆ SetApprovedURL()

SimpleOpenID::SetApprovedURL ( $a)

SetApprovedURL.

Parameters
string$aServer
Returns
void

Definition at line 93 of file openid.class.php.

◆ SetCancelURL()

SimpleOpenID::SetCancelURL ( $a)

SetOpenIDServer.

Parameters
string$aServer
Returns
void

Definition at line 80 of file openid.class.php.

◆ SetIdentity()

SimpleOpenID::SetIdentity ( $a)

SetIdentity.

Parameters
string$aServer
Returns
void

Definition at line 140 of file openid.class.php.

Referenced by GetOpenIDServer().

◆ SetOpenIDServer()

SimpleOpenID::SetOpenIDServer ( $a)

SetOpenIDServer.

Parameters
string$aServer
Returns
void

Definition at line 54 of file openid.class.php.

Referenced by GetOpenIDServer().

◆ SetOptionalFields()

SimpleOpenID::SetOptionalFields ( $a)

SetOptionalFields.

Parameters
string | array$aServer
Returns
void

Definition at line 123 of file openid.class.php.

◆ SetRequiredFields()

SimpleOpenID::SetRequiredFields ( $a)

SetRequiredFields.

Parameters
string | array$aServer
Returns
void

Definition at line 106 of file openid.class.php.

◆ SetTrustRoot()

SimpleOpenID::SetTrustRoot ( $a)

SetOpenIDServer.

Parameters
string$aServer
Returns
void

Definition at line 67 of file openid.class.php.

◆ splitResponse()

SimpleOpenID::splitResponse ( $response)

splitResponse

Parameters
string$responseServer
Returns
array

Definition at line 231 of file openid.class.php.

◆ validateWithServer()

SimpleOpenID::validateWithServer ( )

validateWithServer

Returns
boolean

Definition at line 440 of file openid.class.php.


The documentation for this class was generated from the following file: