Commit 7d8518a
committed
Add support for the special common/organizations/consumers Azure AD tenants
When not targeting a specific Azure AD tenant (specified by a tenant GUID in
the discovery document URL) but rather one of the "common", "organizations"
or "consumers" multi-tenant aliases (see 1), discovery document parsing and ID
token validation require a few extra steps:
* The discovery document's "issuer" value contains the special placeholder
"{tenantid}". As '{' and '}' are invalid characters in URLs, AppAuth has to
URL encode these characters before the issuer URL can be parsed by NSURL in
OIDServiceDiscovery.m.
* The same "{tenantid}" placeholder needs to be replaced with the actual
tenant ID of the authenticated user, from the "tid" claim (see 2) of the ID
token, before ID token validation is performed in OIDAuthorizationService.m.
1: https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#fetch-the-openid-connect-metadata-document
2: https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens#payload-claims1 parent eee20d3 commit 7d8518a
File tree
2 files changed
+20
-0
lines changed- Sources/AppAuthCore
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
566 | 576 | | |
567 | 577 | | |
568 | 578 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
| |||
0 commit comments