PHP 클래스 OAuthSimple, oauthsimple

https://github.com/jrconlin/oauthsimple
저자: jr conlin ([email protected])
파일 보기 프로젝트 열기: jrconlin/oauthsimple 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$path
$sbs

공개 메소드들

메소드 설명
__construct ( string $APIKey = "", string $sharedSecret = "" ) : OAuthSimple Constructor
getHeaderString ( array $args = [] ) : string Return a formatted "header" string
reset ( ) : OAuthSimple Reset the parameters and URL
setAction ( string $action ) : OAuthSimple Set the "action" for the url, (e.g. GET,POST, DELETE, etc.)
setParameters ( string | array | object $parameters = [] ) : OAuthSimple Set the parameters either from a hash or a string
setPath ( string $path ) : mixed Convenience method for setURL
setQueryString ( $parameters ) : OAuthSimple Convenience method for setParameters
setSignatureMethod ( string $method = "" ) : string Set the signature method (currently only Plaintext or SHA-MAC1)
setTokensAndSecrets ( $signatures ) : OAuthSimple
setURL ( string $path ) : OAuthSimple Set the target URL (does not include the parameters)
sign ( array $args = [] ) : array sign the request
signatures ( $signatures ) : OAuthSimple Set the signatures (as well as validate the ones you have)

비공개 메소드들

메소드 설명
_generateSignature ( $parameters = "" )
_getAccessToken ( )
_getApiKey ( )
_getNonce ( $length = 5 )
_getTimeStamp ( )
_normalizedParameters ( )
_oauthEscape ( $string )
_parseParameterString ( $paramString )

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $APIKey = "", string $sharedSecret = "" ) : OAuthSimple
$APIKey string The API Key (sometimes referred to as the consumer key) This value is usually supplied by the site you wish to use.
$sharedSecret string The shared secret. This value is also usually provided by the site you wish to use.
리턴 OAuthSimple

getHeaderString() 공개 메소드

NOTE: This doesn't set the "Authorization: " prefix, which is required. It's not set because various set header functions prefer different ways to do that.
public getHeaderString ( array $args = [] ) : string
$args array
리턴 string

reset() 공개 메소드

Reset the parameters and URL
public reset ( ) : OAuthSimple
리턴 OAuthSimple

setAction() 공개 메소드

Set the "action" for the url, (e.g. GET,POST, DELETE, etc.)
public setAction ( string $action ) : OAuthSimple
$action string HTTP Action word.
리턴 OAuthSimple

setParameters() 공개 메소드

Set the parameters either from a hash or a string
public setParameters ( string | array | object $parameters = [] ) : OAuthSimple
$parameters string | array | object List of parameters for the call, this can either be a URI string (e.g. "foo=bar&gorp=banana" or an object/hash)
리턴 OAuthSimple

setPath() 공개 메소드

Convenience method for setURL
또한 보기: setURL
public setPath ( string $path ) : mixed
$path string
리턴 mixed

setQueryString() 공개 메소드

Convenience method for setParameters
또한 보기: setParameters
public setQueryString ( $parameters ) : OAuthSimple
$parameters
리턴 OAuthSimple

setSignatureMethod() 공개 메소드

Set the signature method (currently only Plaintext or SHA-MAC1)
public setSignatureMethod ( string $method = "" ) : string
$method string Method of signing the transaction (only PLAINTEXT and SHA-MAC1 allowed for now)
리턴 string OAuthSimple

setTokensAndSecrets() 공개 메소드

public setTokensAndSecrets ( $signatures ) : OAuthSimple
$signatures
리턴 OAuthSimple

setURL() 공개 메소드

Set the target URL (does not include the parameters)
public setURL ( string $path ) : OAuthSimple
$path string The fully qualified URI (excluding query arguments) (e.g "http://example.org/foo")
리턴 OAuthSimple

sign() 공개 메소드

note: all arguments are optional, provided you've set them using the other helper functions.
public sign ( array $args = [] ) : array
$args array hash of arguments for the call {action, path, parameters (array), method, signatures (array)} all arguments are optional.
리턴 array signed values

signatures() 공개 메소드

Set the signatures (as well as validate the ones you have)
public signatures ( $signatures ) : OAuthSimple
$signatures (object) object/hash of the token/signature pairs {api_key:, shared_secret:, oauth_token: oauth_secret:}
리턴 OAuthSimple

프로퍼티 상세

$path 공개적으로 프로퍼티

public $path

$sbs 공개적으로 프로퍼티

public $sbs