Skip to content

Commit ef8ca57

Browse files
authored
Fix indentation (#33878)
1 parent a31bbf1 commit ef8ca57

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

aspnetcore/blazor/security/blazor-web-app-with-oidc.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ The following <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConn
138138

139139
* <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> and configuration of <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.NameClaimType%2A> and <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.RoleClaimType%2A>: Many OIDC servers use "`name`" and "`role`" rather than the SOAP/WS-Fed defaults in <xref:System.Security.Claims.ClaimTypes>. When <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> is set to `false`, the handler doesn't perform claims mappings, and the claim names from the JWT are used directly by the app. The following example sets the role claim type to "`roles`," which is appropriate for [Microsoft Entra ID (ME-ID)](https://www.microsoft.com/security/business/microsoft-entra). Consult your identity provider's documentation for more information.
140140

141-
> [!NOTE]
142-
> <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> must be set to `false` for most OIDC providers, which prevents renaming claims.
141+
> [!NOTE]
142+
> <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> must be set to `false` for most OIDC providers, which prevents renaming claims.
143143
144144
```csharp
145145
oidcOptions.MapInboundClaims = false;
@@ -179,19 +179,19 @@ The following <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConn
179179
> [!NOTE]
180180
> A port isn't required for `localhost` addresses when using Microsoft Entra ID. Most other OIDC providers require a correct port.
181181
182-
```csharp
183-
oidcOptions.CallbackPath = new PathString("{PATH}");
184-
oidcOptions.SignedOutCallbackPath = new PathString("{PATH}");
185-
oidcOptions.RemoteSignOutPath = new PathString("{PATH}");
186-
```
182+
```csharp
183+
oidcOptions.CallbackPath = new PathString("{PATH}");
184+
oidcOptions.SignedOutCallbackPath = new PathString("{PATH}");
185+
oidcOptions.RemoteSignOutPath = new PathString("{PATH}");
186+
```
187187

188-
Examples (default values):
188+
Examples (default values):
189189

190-
```csharp
191-
oidcOptions.CallbackPath = new PathString("/signin-oidc");
192-
oidcOptions.SignedOutCallbackPath = new PathString("/signout-callback-oidc");
193-
oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
194-
```
190+
```csharp
191+
oidcOptions.CallbackPath = new PathString("/signin-oidc");
192+
oidcOptions.SignedOutCallbackPath = new PathString("/signout-callback-oidc");
193+
oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
194+
```
195195

196196
* (*Microsoft Azure only with the "common" endpoint*) <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.IssuerValidator%2A?displayProperty=nameWithType>: Many OIDC providers work with the default issuer validator, but we need to account for the issuer parameterized with the Tenant ID (`{TENANT ID}`) returned by `https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration`. For more information, see [SecurityTokenInvalidIssuerException with OpenID Connect and the Azure AD "common" endpoint (`AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet` #1731)](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/1731).
197197
@@ -412,8 +412,8 @@ The following <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConn
412412

413413
* <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> and configuration of <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.NameClaimType%2A> and <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.RoleClaimType%2A>: Many OIDC servers use "`name`" and "`role`" rather than the SOAP/WS-Fed defaults in <xref:System.Security.Claims.ClaimTypes>. When <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> is set to `false`, the handler doesn't perform claims mappings and the claim names from the JWT are used directly by the app. The following example sets the role claim type to "`roles`," which is appropriate for [Microsoft Entra ID (ME-ID)](https://www.microsoft.com/security/business/microsoft-entra). Consult your identity provider's documentation for more information.
414414

415-
> [!NOTE]
416-
> <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> must be set to `false` for most OIDC providers, which prevents renaming claims.
415+
> [!NOTE]
416+
> <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectOptions.MapInboundClaims%2A> must be set to `false` for most OIDC providers, which prevents renaming claims.
417417
418418
```csharp
419419
oidcOptions.MapInboundClaims = false;
@@ -453,19 +453,19 @@ The following <xref:Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConn
453453
> [!NOTE]
454454
> A port isn't required for `localhost` addresses.
455455
456-
```csharp
457-
oidcOptions.CallbackPath = new PathString("{PATH}");
458-
oidcOptions.SignedOutCallbackPath = new PathString("{PATH}");
459-
oidcOptions.RemoteSignOutPath = new PathString("{PATH}");
460-
```
456+
```csharp
457+
oidcOptions.CallbackPath = new PathString("{PATH}");
458+
oidcOptions.SignedOutCallbackPath = new PathString("{PATH}");
459+
oidcOptions.RemoteSignOutPath = new PathString("{PATH}");
460+
```
461461

462-
Examples (default values):
462+
Examples (default values):
463463

464-
```csharp
465-
oidcOptions.CallbackPath = new PathString("/signin-oidc");
466-
oidcOptions.SignedOutCallbackPath = new PathString("/signout-callback-oidc");
467-
oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
468-
```
464+
```csharp
465+
oidcOptions.CallbackPath = new PathString("/signin-oidc");
466+
oidcOptions.SignedOutCallbackPath = new PathString("/signout-callback-oidc");
467+
oidcOptions.RemoteSignOutPath = new PathString("/signout-oidc");
468+
```
469469

470470
* (*Microsoft Azure only with the "common" endpoint*) <xref:Microsoft.IdentityModel.Tokens.TokenValidationParameters.IssuerValidator%2A?displayProperty=nameWithType>: Many OIDC providers work with the default issuer validator, but we need to account for the issuer parameterized with the Tenant ID (`{TENANT ID}`) returned by `https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration`. For more information, see [SecurityTokenInvalidIssuerException with OpenID Connect and the Azure AD "common" endpoint (`AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet` #1731)](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/1731).
471471

0 commit comments

Comments
 (0)