PHP 클래스 ApiAuthorization

파일 보기 프로젝트 열기: fubralimited/php-oara

공개 메소드들

메소드 설명
__construct ( ) : void Contructor
getConnectId ( ) : string Returns the connectId
getNonce ( ) : string Returns hash based nonce.
getPublicKey ( ) : string Returns the public key
getSignature ( string $service, string $method, string $nonce ) : string Returns the crypted hash signature for the message.
getTimestamp ( ) : string Returns the current REST timestamp.
isSecureApiCall ( ) : boolean Returns message security status.
setConnectId ( string $connectId ) : void Set the connectId
setPublicKey ( string $publicKey ) : void Sets the public key.
setSecretKey ( string $secretKey ) : void Set SecretKey
setSecureApiCall ( $status = false ) : void Enables the API authentication.
setTimestamp ( string $timestamp ) : void Set connectId
setVersion ( string $version ) : void Sets the API version to use.

비공개 메소드들

메소드 설명
encodeBase64 ( string $str ) : encoded Encodes the given message parameters with Base64.
hmac ( $mesgparams ) : string Creates secured HMAC signature of the message parameters.

메소드 상세

__construct() 공개 메소드

Contructor
public __construct ( ) : void
리턴 void

getConnectId() 최종 공개 메소드

Returns the connectId
final public getConnectId ( ) : string
리턴 string zanox connect id

getNonce() 최종 공개 메소드

Returns hash based nonce.
또한 보기: http://en.wikipedia.org/wiki/Cryptographic_nonce
final public getNonce ( ) : string
리턴 string md5 hash-based nonce

getPublicKey() 최종 공개 메소드

Returns the public key
final public getPublicKey ( ) : string
리턴 string zanox public key

getSignature() 최종 공개 메소드

Builds the signed string consisting of the rest action verb, the uri used and the timestamp of the message. Be aware of the 15 minutes timeframe when setting the time manually.
final public getSignature ( string $service, string $method, string $nonce ) : string
$service string service name or restful action
$method string method or uri
$nonce string nonce of request
리턴 string encoded string

getTimestamp() 최종 공개 메소드

If there hasn't already been set a datetime we create one automatically. As a format the HTTP Header protocol RFC format is taken.
또한 보기: see HTTP RFC for the datetime format
final public getTimestamp ( ) : string
리턴 string message timestamp

isSecureApiCall() 최종 공개 메소드

Method returns true if message needs to signed with crypted hmac string and nonce. Otherwise false is returned.
final public isSecureApiCall ( ) : boolean
리턴 boolean true if secure message

setConnectId() 최종 공개 메소드

Set the connectId
final public setConnectId ( string $connectId ) : void
$connectId string zanox connectId
리턴 void

setPublicKey() 최종 공개 메소드

Sets the public key.
final public setPublicKey ( string $publicKey ) : void
$publicKey string public key
리턴 void

setSecretKey() 최종 공개 메소드

Set SecretKey
final public setSecretKey ( string $secretKey ) : void
$secretKey string zanox secret key
리턴 void

setSecureApiCall() 최종 공개 메소드

Authentication is only required and therefore enabled for some privacy related methods like accessing your profile or reports.
final public setSecureApiCall ( $status = false ) : void
리턴 void

setTimestamp() 최종 공개 메소드

Set connectId
final public setTimestamp ( string $timestamp ) : void
$timestamp string time stamp
리턴 void

setVersion() 최종 공개 메소드

Sets the API version to use.
final public setVersion ( string $version ) : void
$version string API version
리턴 void