프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$authUrl | authentication base URL, which should be used to compose actual authentication URL by OpenId::buildAuthUrl method. | ||
$axToSregMap | map of matches between AX and SREG attribute names in format: axAttributeName => sregAttributeName | ||
$cainfo | the name of a file holding one or more certificates to verify the peer with. This value will take effect only if [[verifyPeer]] is set. | ||
$capath | directory that holds multiple CA certificates. This value will take effect only if [[verifyPeer]] is set. | ||
$data | data, which should be used to retrieve the OpenID response. If not set combination of GET and POST will be used. | ||
$optionalAttributes | list of attributes, which could be returned from server. Attribute names should be always specified in AX format. For example: php ['namePerson/first', 'namePerson/last'] | ||
$requiredAttributes | list of attributes, which always should be returned from server. Attribute names should be always specified in AX format. For example: php ['namePerson/friendly', 'contact/email'] | ||
$verifyPeer | whether to verify the peer's certificate. |
메소드 | 설명 | |
---|---|---|
buildAuthUrl ( boolean $identifierSelect = null ) : string | Returns authentication URL. Usually, you want to redirect your user to it. | |
discover ( string $url ) : array | Performs Yadis and HTML discovery. | |
fetchAttributes ( ) : array | Gets AX/SREG attributes provided by OP. Should be used only after successful validation. | |
getClaimedId ( ) : string | ||
getReturnUrl ( ) : string | ||
getTrustRoot ( ) : string | ||
hostExists ( string $url ) : boolean | Checks if the server specified in the url exists. | |
init ( ) | ||
setClaimedId ( string $claimedId ) | ||
setReturnUrl ( string $returnUrl ) | ||
setTrustRoot ( string $value ) | ||
validate ( boolean $validateRequiredAttributes = true ) : boolean | Performs OpenID verification with the OP. |
메소드 | 설명 | |
---|---|---|
buildAuthUrlV1 ( array $serverInfo ) : string | Builds authentication URL for the protocol version 1. | |
buildAuthUrlV2 ( array $serverInfo ) : string | Builds authentication URL for the protocol version 2. | |
buildAxParams ( ) : array | Composes AX request parameters. | |
buildSregParams ( ) : array | Composes SREG request parameters. | |
buildUrl ( string $baseUrl, string | array $additionalUrl ) : string | Combines given URLs into single one. | |
compareUrl ( string $expectedUrl, string $actualUrl ) : boolean | Compares 2 URLs taking in account possible GET parameters order miss match and URL encoding inconsistencies. | |
defaultRequestOptions ( ) | ||
defaultReturnUrl ( ) : string | Generates default [[returnUrl]] value. | |
extractHtmlTagValue ( string $content, string $tag, string $matchAttributeName, string $matchAttributeValue, string $valueAttributeName ) : string | boolean | Scans content for / tags and extract information from them. | |
fetchAxAttributes ( ) : array | Gets AX attributes provided by OP. | |
fetchSregAttributes ( ) : array | Gets SREG attributes provided by OP. SREG names will be mapped to AX names. | |
initUserAttributes ( ) | ||
sendRequest ( string $url, string $method = 'GET', array $params = [] ) : array | string | Sends request to the server | |
validateRequiredAttributes ( ) : boolean | Checks if all required attributes are present in the server response. |
public buildAuthUrl ( boolean $identifierSelect = null ) : string | ||
$identifierSelect | boolean | whether to request OP to select identity for an user in OpenID 2, does not affect OpenID 1. |
리턴 | string | the authentication URL. |
protected buildAuthUrlV1 ( array $serverInfo ) : string | ||
$serverInfo | array | OpenID server info. |
리턴 | string | authentication URL. |
protected buildAuthUrlV2 ( array $serverInfo ) : string | ||
$serverInfo | array | OpenID server info. |
리턴 | string | authentication URL. |
protected buildAxParams ( ) : array | ||
리턴 | array | AX parameters. |
protected buildSregParams ( ) : array | ||
리턴 | array | SREG parameters. |
protected defaultReturnUrl ( ) : string | ||
리턴 | string | default authentication return URL. |
public discover ( string $url ) : array | ||
$url | string | Identity URL. |
리턴 | array | OpenID provider info, following keys will be available: - url: string, OP Endpoint (i.e. OpenID provider address). - version: int, OpenID protocol version used by provider. - identity: string, identity value. - identifier_select: bool, whether to request OP to select identity for an user in OpenID 2, does not affect OpenID 1. - ax: bool, whether AX attributes should be used. - sreg: bool, whether SREG attributes should be used. |
protected extractHtmlTagValue ( string $content, string $tag, string $matchAttributeName, string $matchAttributeValue, string $valueAttributeName ) : string | boolean | ||
$content | string | HTML content to be be parsed. |
$tag | string | name of the source tag. |
$matchAttributeName | string | name of the source tag attribute, which should contain $matchAttributeValue |
$matchAttributeValue | string | required value of $matchAttributeName |
$valueAttributeName | string | name of the source tag attribute, which should contain searched value. |
리턴 | string | boolean | searched value, "false" on failure. |
public fetchAttributes ( ) : array | ||
리턴 | array | array of attributes with keys being the AX schema names, e.g. 'contact/email' |
protected fetchAxAttributes ( ) : array | ||
리턴 | array | array of attributes. |
protected fetchSregAttributes ( ) : array | ||
리턴 | array | array of attributes with keys being the AX schema names, e.g. 'contact/email' |
public hostExists ( string $url ) : boolean | ||
$url | string | URL to check |
리턴 | boolean | true, if the server exists; false otherwise |
public setClaimedId ( string $claimedId ) | ||
$claimedId | string | claimed identifier (identity). |
public setReturnUrl ( string $returnUrl ) | ||
$returnUrl | string | authentication return URL. |
public setTrustRoot ( string $value ) | ||
$value | string | client trust root (realm). |
protected validateRequiredAttributes ( ) : boolean | ||
리턴 | boolean | whether all required attributes are present. |
public $authUrl |
public $axToSregMap |
public $cainfo |
public $capath |
public $data |
public $optionalAttributes |
public $requiredAttributes |