PHP Интерфейс IAuthorization

The IAuthorization Interface defines the methods that need to be implemented in order to support the required hash-based signing of messages. Supported Version: PHP >= 5.0
См. также: http://wiki.zanox.com/en/Web_Services
См. также: http://apps.zanox.com
Автор: Thomas Nicolai ([email protected])
Автор: Lars Kirchhoff ([email protected])
Показать файл Открыть проект

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

Метод Описание
getConnectId ( ) : string Returns connectId
getNonce ( ) : string Returns nonce.
getPublicKey ( ) : string Returns the public key
getSignature ( string $service, string $method, string $nonce ) : string Returns the crypted hash signature for a api message.
getTimestamp ( ) : string Returns the current REST timestamp.
isSecureApiCall ( ) : boolean Returns message security status.
setConnectId ( string $connectId ) : void Set 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.

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

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

Returns connectId
public getConnectId ( ) : string
Результат string zanox connect id

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

Returns nonce.
См. также: http://en.wikipedia.org/wiki/Cryptographic_nonce
public getNonce ( ) : string
Результат string nonce

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

Returns the public key
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.
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
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.
public isSecureApiCall ( ) : boolean
Результат boolean true if secure message

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

Set connectId
public setConnectId ( string $connectId ) : void
$connectId string zanox connectId
Результат void

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

Sets the public key.
public setPublicKey ( string $publicKey ) : void
$publicKey string public key
Результат void

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

Set SecretKey
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.
public setSecureApiCall ( $status = false ) : void
Результат void

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

Set connectId
public setTimestamp ( string $timestamp ) : void
$timestamp string time stamp
Результат void

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

Sets the API version to use.
public setVersion ( string $version ) : void
$version string API version
Результат void