C# 클래스 PayPal.Api.OAuthTokenCredential

OAuthTokenCredential is used for generation of OAuth Token used by PayPal REST API service. clientId and clientSecret are required by the class to generate OAuth Token, the resulting token is of the form "Bearer xxxxxx". The class has two constructors, one of it taking an additional Dictionary used for dynamic configuration.
파일 보기 프로젝트 열기: paypal/PayPal-NET-SDK 1 사용 예제들

공개 메소드들

메소드 설명
GetAccessToken ( ) : string

Returns the currently cached access token. If no access token was previously cached, or if the current access token is expired, then a new one is generated and returned.

OAuthTokenCredential ( string>.Dictionary config ) : System

OAuthTokenCredential ( string clientId, string clientSecret ) : System

Client Id and Secret for the OAuth

OAuthTokenCredential ( string clientId = "", string clientSecret = "", string>.Dictionary config = null ) : System

Client Id and Secret for the OAuth

비공개 메소드들

메소드 설명
GenerateOAuthToken ( ) : string

Generates a new OAuth token useing the specified client credentials in the authorization request.

GetEndpointOverride ( ) : string

Gets the overridden endpoint defined in the config, if set. Otherwise returns an empty string, in which case the default endpoint will be used when requesting a new token.

메소드 상세

GetAccessToken() 공개 메소드

Returns the currently cached access token. If no access token was previously cached, or if the current access token is expired, then a new one is generated and returned.
Thrown if clientId or clientSecret are null or empty. Thrown if there is an issue converting the credentials to a formatted authorization string. Thrown if authorization fails as a result of providing invalid credentials. Thrown if authorization fails and an HTTP error response is received. Thrown if there is an issue attempting to connect to PayPal's services. Thrown if there is an error with any informaiton provided by the . Thrown for any other general exception. See inner exception for further details.
public GetAccessToken ( ) : string
리턴 string

OAuthTokenCredential() 공개 메소드

public OAuthTokenCredential ( string>.Dictionary config ) : System
config string>.Dictionary
리턴 System

OAuthTokenCredential() 공개 메소드

Client Id and Secret for the OAuth
public OAuthTokenCredential ( string clientId, string clientSecret ) : System
clientId string
clientSecret string
리턴 System

OAuthTokenCredential() 공개 메소드

Client Id and Secret for the OAuth
public OAuthTokenCredential ( string clientId = "", string clientSecret = "", string>.Dictionary config = null ) : System
clientId string
clientSecret string
config string>.Dictionary
리턴 System