C# 클래스 Teference.Shopify.Api.ShopifyOAuth

Authentication and authorize your application against SHOPIFY API OAUTH 2.0 implementation.
상속: IShopifyOAuth
파일 보기 프로젝트 열기: teference/shopify-dotnet

공개 메소드들

메소드 설명
AuthorizeClient ( NameValueCollection queryStringCollection ) : OAuthState

Performs SHOPIFY OAUTH 2.0 authorization process based on shop access permission accepted.

AuthorizeClient ( string shopName, string authorizationCode, string hmacHash, string timestamp ) : OAuthState

Performs SHOPIFY OAUTH 2.0 authorization process based on shop access permission accepted.

GetOAuthUrl ( string shopName, OAuthScope scope ) : string

Get URL to use for redirection at SHOPIFY OAUTH 2.0 authorization server, asking for permission to access intended store.

ShopifyOAuth ( ) : System

Initializes a new instance of the ShopifyOAuth class.

If initializes with empty constructor, library expected two application setting to be found in 'web.config' / 'app.config'.

1. 'shopify-dotnet-api-key' - Shopify application API key.

2. 'shopify-dotnet-secret-key' - Shopify application shared secret key.

ShopifyOAuth ( OAuthConfiguration configuration ) : System

Initializes a new instance of the ShopifyOAuth class.

Use this constructor in case you do not wish this library to fetch API and Secret Key from configuration file.

비공개 메소드들

메소드 설명
ByteArrayToHexString ( ICollection byteData ) : string
ValidateInstallResponse ( OAuthState installState ) : bool

메소드 상세

AuthorizeClient() 공개 메소드

Performs SHOPIFY OAUTH 2.0 authorization process based on shop access permission accepted.
Throws argument null exception if input parameters are null or empty.
public AuthorizeClient ( NameValueCollection queryStringCollection ) : OAuthState
queryStringCollection System.Collections.Specialized.NameValueCollection Instance of name value collection of query string returned in request of the callback URL by SHOPIFY authorization server.
리턴 OAuthState

AuthorizeClient() 공개 메소드

Performs SHOPIFY OAUTH 2.0 authorization process based on shop access permission accepted.
Throws argument null exception if input parameters are null or empty.
public AuthorizeClient ( string shopName, string authorizationCode, string hmacHash, string timestamp ) : OAuthState
shopName string Authorization shop name.
authorizationCode string Intermediate authorization code, required to complete SHOPIFY OAUTH 2.0 authorization.
hmacHash string HMAC hash value.
timestamp string Timestamp value returned in the callback query string.
리턴 OAuthState

GetOAuthUrl() 공개 메소드

Get URL to use for redirection at SHOPIFY OAUTH 2.0 authorization server, asking for permission to access intended store.
Throws argument null exception if input parameters are null or empty.
public GetOAuthUrl ( string shopName, OAuthScope scope ) : string
shopName string Authorization shop name (w/o '.myshopify.com', only shop name). In case it contains '.myshopify.com' then it would be trimmed out to continue
scope OAuthScope SHOPIFY OAUTH 2.0 permission scope(s) for which store admin will be asked permission for.
리턴 string

ShopifyOAuth() 공개 메소드

Initializes a new instance of the ShopifyOAuth class.

If initializes with empty constructor, library expected two application setting to be found in 'web.config' / 'app.config'.

1. 'shopify-dotnet-api-key' - Shopify application API key.

2. 'shopify-dotnet-secret-key' - Shopify application shared secret key.

Throws argument null exception if 'shopify-dotnet-api-key' and 'shopify-dotnet-secret-key' not found or empty. Throws argument null exception if 'shopify-dotnet-api-key' and 'shopify-dotnet-secret-key' not found or empty.
public ShopifyOAuth ( ) : System
리턴 System

ShopifyOAuth() 공개 메소드

Initializes a new instance of the ShopifyOAuth class.

Use this constructor in case you do not wish this library to fetch API and Secret Key from configuration file.

Throws argument null exception if input parameters are null or empty.
public ShopifyOAuth ( OAuthConfiguration configuration ) : System
configuration OAuthConfiguration Instance of OAUTH settings.
리턴 System