From 7feb21137fc35d5ba74b96f52ff0833a20c14a63 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Feb 2015 13:11:07 +0000 Subject: [PATCH] Retrieve Salesforce Organization ID claim --- .../Salesforce/SalesforceAuthenticationHandler.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Owin.Security.Providers/Salesforce/SalesforceAuthenticationHandler.cs b/Owin.Security.Providers/Salesforce/SalesforceAuthenticationHandler.cs index 7d78a5f..680c781 100644 --- a/Owin.Security.Providers/Salesforce/SalesforceAuthenticationHandler.cs +++ b/Owin.Security.Providers/Salesforce/SalesforceAuthenticationHandler.cs @@ -134,6 +134,11 @@ namespace Owin.Security.Providers.Salesforce { context.Identity.AddClaim(new Claim("urn:Salesforce:name", context.DisplayName, XmlSchemaString, Options.AuthenticationType)); } + + if (!string.IsNullOrEmpty(context.DisplayName)) + { + context.Identity.AddClaim(new Claim("urn:Salesforce:organization_id", context.OrganizationId, XmlSchemaString, Options.AuthenticationType)); + } context.Properties = properties;