Skip to content

Commit fa13c76

Browse files
author
Tiago Brenck
committed
Fix spelling mistakes
1 parent 1bfaeaa commit fa13c76

File tree

5 files changed

+23
-20
lines changed

5 files changed

+23
-20
lines changed

Microsoft.Identity.Web/AuthorityHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal static string BuildAuthority(MicrosoftIdentityOptions options)
2121
if (options == null)
2222
return null;
2323

24-
// Cannot build authority without AAD Intance or Domain
24+
// Cannot build authority without AAD Instance or Domain
2525
if (string.IsNullOrWhiteSpace(options.Instance) || string.IsNullOrWhiteSpace(options.Domain))
2626
return null;
2727

Microsoft.Identity.Web/AzureADB2COpenIDConnectEventHandlers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public Task OnRemoteFailure(RemoteFailureContext context)
6969
}
7070
// Access denied errors happen when a user cancels an action on the Azure Active Directory B2C UI. We just redirect back to
7171
// the main page in that case.
72-
// Message contains error: 'access_denied', error_description: 'AADB2C90091: The user has cancelled entering self-asserted information.
72+
// Message contains error: 'access_denied', error_description: 'AADB2C90091: The user has canceled entering self-asserted information.
7373
// Correlation ID: d01c8878-0732-4eb2-beb8-da82a57432e0
7474
// Timestamp: 2018-03-05 02:56:49Z
7575
// ', error_uri: 'error_uri is null'.

Microsoft.Identity.Web/Resource/AadIssuerValidator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private static string GetTenantIdFromToken(SecurityToken securityToken)
165165
if (jwtSecurityToken.Payload.TryGetValue(ClaimConstants.Tid, out object tenantId))
166166
return tenantId as string;
167167

168-
// Since B2C doesnt have TID as default, try to get it from iss claims
168+
// Since B2C doesn't have TID as default, try to get it from iss claims
169169
if (jwtSecurityToken.Claims.Any(c => c.Type == ClaimConstants.Acr || c.Type == ClaimConstants.Tfp))
170170
return GetTenantIdFromIss(jwtSecurityToken.Issuer);
171171
}

Microsoft.Identity.Web/TokenAcquisition.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public async Task AddAccountToCacheFromAuthorizationCodeAsync(AuthorizationCodeR
157157
/// passing the validated token (as a JwtSecurityToken). Calling it from a Web App supposes that
158158
/// you have previously called AddAccountToCacheFromAuthorizationCodeAsync from a method called by
159159
/// OpenIdConnectOptions.Events.OnAuthorizationCodeReceived</remarks>
160-
[Obsolete("Renamed to GetAccessTokenForUserAsync. Please use that method")]
160+
[Obsolete("This method has been deprecated, please use the GetAccessTokenForUserAsync() method instead.")]
161161
public async Task<string> GetAccessTokenOnBehalfOfUserAsync(
162162
IEnumerable<string> scopes,
163163
string tenant = null)
@@ -224,7 +224,7 @@ public async Task<string> GetAccessTokenForUserAsync(
224224
accessToken = result.AccessToken;
225225
}
226226

227-
// Case of the Web App: we let the the MsalUiRequiredException be caught by the
227+
// Case of the Web App: we let the MsalUiRequiredException be caught by the
228228
// AuthorizeForScopesAttribute exception filter so that the user can consent, do 2FA, etc ...
229229
else
230230
{

Microsoft.Identity.Web/WebAppServiceCollectionExtensions.cs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace Microsoft.Identity.Web
2424
public static class WebAppServiceCollectionExtensions
2525
{
2626
#region
27-
[Obsolete("Use AddSignIn")]
27+
[Obsolete("This method has been deprecated, please use the AddSignIn() method instead.")]
2828
public static IServiceCollection AddMicrosoftIdentityPlatform(
2929
this IServiceCollection services,
3030
IConfiguration configuration,
@@ -40,7 +40,7 @@ public static IServiceCollection AddMicrosoftIdentityPlatform(
4040
return services;
4141
}
4242

43-
[Obsolete("Use AddWebAppCallsProtectedWebApi")]
43+
[Obsolete("This method has been deprecated, please use the AddWebAppCallsProtectedWebApi() method instead.")]
4444
public static IServiceCollection AddMsal(this IServiceCollection services,
4545
IConfiguration configuration,
4646
IEnumerable<string> initialScopes,
@@ -60,9 +60,9 @@ public static IServiceCollection AddMsal(this IServiceCollection services,
6060
/// <param name="initialScopes">Initial scopes to request at sign-in</param>
6161
/// <returns></returns>
6262
public static IServiceCollection AddWebAppCallsProtectedWebApi(
63-
this IServiceCollection services,
64-
IConfiguration configuration,
65-
IEnumerable<string> initialScopes,
63+
this IServiceCollection services,
64+
IConfiguration configuration,
65+
IEnumerable<string> initialScopes,
6666
string configSectionName = "AzureAd",
6767
string openIdConnectScheme = OpenIdConnectDefaults.AuthenticationScheme)
6868
{
@@ -125,8 +125,8 @@ public static IServiceCollection AddWebAppCallsProtectedWebApi(
125125
/// </param>
126126
/// <returns></returns>
127127
public static AuthenticationBuilder AddSignIn(
128-
this AuthenticationBuilder builder,
129-
IConfiguration configuration,
128+
this AuthenticationBuilder builder,
129+
IConfiguration configuration,
130130
Action<OpenIdConnectOptions> configureOptions,
131131
bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false) =>
132132
builder.AddSignIn(
@@ -150,9 +150,9 @@ public static AuthenticationBuilder AddSignIn(
150150
/// </param>
151151
/// <returns></returns>
152152
public static AuthenticationBuilder AddSignIn(
153-
this AuthenticationBuilder builder,
154-
string configSectionName,
155-
IConfiguration configuration,
153+
this AuthenticationBuilder builder,
154+
string configSectionName,
155+
IConfiguration configuration,
156156
Action<OpenIdConnectOptions> configureOptions,
157157
bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false) =>
158158
builder.AddSignIn(
@@ -202,13 +202,16 @@ public static AuthenticationBuilder AddSignIn(
202202

203203
if (!AuthorityHelpers.IsV2Authority(options.Authority))
204204
options.Authority += "/v2.0";
205-
205+
206206
options.TokenValidationParameters.NameClaimType = "preferred_username";
207207

208-
// If you want to restrict the users that can sign-in to several organizations
209-
// Set the tenant value in the appsettings.json file to 'organizations', and add the
210-
// issuers you want to accept to options.TokenValidationParameters.ValidIssuers collection
211-
options.TokenValidationParameters.IssuerValidator = AadIssuerValidator.GetIssuerValidator(options.Authority).Validate;
208+
if (options.TokenValidationParameters.IssuerValidator == null)
209+
{
210+
// If you want to restrict the users that can sign-in to several organizations
211+
// Set the tenant value in the appsettings.json file to 'organizations', and add the
212+
// issuers you want to accept to options.TokenValidationParameters.ValidIssuers collection
213+
options.TokenValidationParameters.IssuerValidator = AadIssuerValidator.GetIssuerValidator(options.Authority).Validate;
214+
}
212215

213216
// Avoids having users being presented the select account dialog when they are already signed-in
214217
// for instance when going through incremental consent

0 commit comments

Comments
 (0)