Skip to content

Commit 335c6b0

Browse files
authored
Merge pull request #120 from aspnetzero/gulp-document
Updated docs for ValidateIssuer and ClaimsMapping of OpenIdConnect
2 parents 2a4a03f + 5b07a92 commit 335c6b0

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

docs/en/Development-Guide-Core.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,28 @@ class="auto-style3"> appsettings.json</span>:
229229
"IsEnabled": "false",
230230
"Authority": "",
231231
"ClientId": "",
232-
"ClientSecret": ""
232+
"ClientSecret": "",
233+
"ValidateIssuer": "true",
234+
"ClaimsMapping: []
233235
}
234236

237+
In some cases, OpenId Connect provider doesn't return claims we want to use. For example, Azure AD doesn't return "nameidentifier" claim but ASP.NET Core Identity uses it to find id of the user. So, in such cases, we can use **ClaimsMapping** to map claims of provider to custom claims.
238+
239+
````json
240+
"ClaimsMapping": [
241+
{
242+
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
243+
"key": "http://schemas.microsoft.com/identity/claims/objectidentifier"
244+
}
245+
]
246+
````
247+
248+
If you are using Azure AD for OpenID Connect and your app is multi-tenant on Azure side, then you need to disable issuer validation, so all Azure AD users can use your app. Note that, multi-tenant app here is the one you have created on your Azure portal, it is not related to AspNet Zero's multi-tenant feature.
249+
250+
````json
251+
"ValidateIssuer": "false"
252+
````
253+
235254
#### Two Factor Login
236255

237256
ASP.NET Zero is ready to provide two factor login, but it's disabled as

0 commit comments

Comments
 (0)