Merge pull request #125 from teference/master

Added Shopify Domain Property to fetch after authorization
This commit is contained in:
Jerrie Pelser
2015-09-11 10:53:32 +07:00
2 changed files with 7 additions and 1 deletions

View File

@@ -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>

View File

@@ -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;