Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ccs messaging to backup authentication system #1466

Merged
merged 1 commit into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Update to the latest version of MSAL .NET (4.35.1).
### Bug Fixes:
**Update XML comment and link**. See issues [#1325](https://github.com/AzureAD/microsoft-identity-web/issues/1325) and [#1322](https://github.com/AzureAD/microsoft-identity-web/issues/1322).

**Update the CCS routing implementation to remove technical debt**. See issue [#1303](https://github.com/AzureAD/microsoft-identity-web/issues/1303).
**Update the backup authentication system routing implementation to remove technical debt**. See issue [#1303](https://github.com/AzureAD/microsoft-identity-web/issues/1303).

1.14.1
==========
Expand All @@ -74,7 +74,7 @@ Update to the latest version of MSAL .NET (4.35.1).
### New Features:
**Microsoft Identity Web now provides a more simplified developer experience with the MSAL.NET token cache**, available for ASP.NET, .NET Core, or .NET Framework. See issue [#1277](https://github.com/AzureAD/microsoft-identity-web/issues/1277) for details.

**Microsoft Identity Web supports, out of the box, AAD Cached Credential Service (CCS) which operates as an AAD backup**, by sending a routing hint to the /authorize and /token endpoints. See issue [#1146](https://github.com/AzureAD/microsoft-identity-web/issues/1146) for details.
**Microsoft Identity Web supports, out of the box, the AAD backup authentication system which operates as an AAD backup**, by sending a routing hint to the /authorize and /token endpoints. See issue [#1146](https://github.com/AzureAD/microsoft-identity-web/issues/1146) for details.

### Bug Fixes:
**Fix isue regarding specifying multiple decryption certificates**. See issue [#1243](https://github.com/AzureAD/microsoft-identity-web/issues/1243) for details.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Identity.Web/Constants/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static class Constants
internal const string LoginHintParameter = "loginHint";
internal const string DomainHintParameter = "domainHint";

// CCS
// Backup authentication system
internal const string XAnchorMailbox = "x-anchormailbox";
internal const string Upn = "upn";
}
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.Identity.Web/TokenAcquisition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,21 +162,21 @@ public async Task AddAccountToCacheFromAuthorizationCodeAsync(
// Share the ID token though

string? clientInfo = context!.ProtocolMessage?.GetParameter(ClaimConstants.ClientInfo);
string? ccsRoutingHint = string.Empty;
string? backUpAuthRoutingHint = string.Empty;
if (!string.IsNullOrEmpty(clientInfo))
{
ClientInfo? clientInfoFromAuthorize = ClientInfo.CreateFromJson(clientInfo);
if (clientInfoFromAuthorize != null && clientInfoFromAuthorize.UniqueTenantIdentifier != null && clientInfoFromAuthorize.UniqueObjectIdentifier != null)
{
ccsRoutingHint = $"oid:{clientInfoFromAuthorize.UniqueObjectIdentifier}@{clientInfoFromAuthorize.UniqueTenantIdentifier}";
backUpAuthRoutingHint = $"oid:{clientInfoFromAuthorize.UniqueObjectIdentifier}@{clientInfoFromAuthorize.UniqueTenantIdentifier}";
}
}

var builder = application
.AcquireTokenByAuthorizationCode(scopes.Except(_scopesRequestedByMsal), context!.ProtocolMessage!.Code)
.WithSendX5C(mergedOptions.SendX5C)
.WithPkceCodeVerifier(codeVerifier)
.WithCcsRoutingHint(ccsRoutingHint);
.WithCcsRoutingHint(backUpAuthRoutingHint);

if (mergedOptions.IsB2C)
{
Expand Down