PHP 클래스 PayPal\Auth\OAuthTokenCredential

상속: extends PayPal\Common\PayPalResourceModel
파일 보기 프로젝트 열기: paypal/rest-api-sdk-php 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$AUTH_HANDLER Default Auth Handler
$CACHE_PATH
$expiryBufferTime integer Private Variable

공개 메소드들

메소드 설명
__construct ( string $clientId, string $clientSecret ) Construct
decrypt ( $data ) : string Helper method to decrypt data using clientSecret as key
encrypt ( $data ) : string Helper method to encrypt data using clientSecret as key
getAccessToken ( $config ) : null | string Get AccessToken
getClientId ( ) : string Get Client ID
getClientSecret ( ) : string Get Client Secret
getRefreshToken ( $config, $authorizationCode = null, array $params = [] ) : string | null Get a Refresh Token from Authorization Code
updateAccessToken ( array $config, string | null $refreshToken = null ) : string Updates Access Token based on given input

보호된 메소드들

메소드 설명
getToken ( array $config, string $clientId, string $clientSecret, string $payload ) : mixed Retrieves the token based on the input configuration

비공개 메소드들

메소드 설명
generateAccessToken ( array $config, null | string $refreshToken = null ) : null Generates a new access token

메소드 상세

__construct() 공개 메소드

Construct
public __construct ( string $clientId, string $clientSecret )
$clientId string client id obtained from the developer portal
$clientSecret string client secret obtained from the developer portal

decrypt() 공개 메소드

Helper method to decrypt data using clientSecret as key
public decrypt ( $data ) : string
$data
리턴 string

encrypt() 공개 메소드

Helper method to encrypt data using clientSecret as key
public encrypt ( $data ) : string
$data
리턴 string

getAccessToken() 공개 메소드

Get AccessToken
public getAccessToken ( $config ) : null | string
$config
리턴 null | string

getClientId() 공개 메소드

Get Client ID
public getClientId ( ) : string
리턴 string

getClientSecret() 공개 메소드

Get Client Secret
public getClientSecret ( ) : string
리턴 string

getRefreshToken() 공개 메소드

Get a Refresh Token from Authorization Code
public getRefreshToken ( $config, $authorizationCode = null, array $params = [] ) : string | null
$config
$authorizationCode
$params array optional arrays to override defaults
리턴 string | null

getToken() 보호된 메소드

Retrieves the token based on the input configuration
protected getToken ( array $config, string $clientId, string $clientSecret, string $payload ) : mixed
$config array
$clientId string
$clientSecret string
$payload string
리턴 mixed

updateAccessToken() 공개 메소드

Updates Access Token based on given input
public updateAccessToken ( array $config, string | null $refreshToken = null ) : string
$config array
$refreshToken string | null
리턴 string

프로퍼티 상세

$AUTH_HANDLER 공개적으로 정적으로 프로퍼티

Default Auth Handler
public static $AUTH_HANDLER

$CACHE_PATH 공개적으로 정적으로 프로퍼티

public static $CACHE_PATH

$expiryBufferTime 공개적으로 정적으로 프로퍼티

Private Variable
public static int $expiryBufferTime
리턴 integer