Merge pull request #125 from teference/master
Added Shopify Domain Property to fetch after authorization
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
UserName = string.IsNullOrWhiteSpace(fullShopifyDomainName) ? null : fullShopifyDomainName.Replace(".myshopify.com", "");
|
||||
Email = TryGetValue(shop, "email");
|
||||
ShopName = TryGetValue(shop, "name");
|
||||
ShopifyDomain = fullShopifyDomainName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -59,6 +60,11 @@
|
||||
/// </summary>
|
||||
public string ShopName { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Shopify domain name.
|
||||
/// </summary>
|
||||
public string ShopifyDomain { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="ClaimsIdentity"/> representing the Shopify shop.
|
||||
/// </summary>
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
if (!string.IsNullOrEmpty(context.ShopName))
|
||||
{
|
||||
context.Identity.AddClaim(new Claim("urn:shopify:shopname", context.ShopName, XmlSchemaString, Options.AuthenticationType));
|
||||
context.Identity.AddClaim(new Claim("urn:shopify:shopdomain", context.ShopifyDomain, XmlSchemaString, Options.AuthenticationType));
|
||||
}
|
||||
|
||||
context.Properties = properties;
|
||||
|
||||
Reference in New Issue
Block a user