Dedent code snippet

pull/4542/head
Scott Addie 2017-10-11 13:48:28 -05:00
parent 87c6f7ecce
commit e0bf5eb48b
1 changed files with 17 additions and 17 deletions

View File

@ -42,25 +42,25 @@ In the preceding code, two authentication services have been added: one for cook
Authentication schemes are named when authentication middlewares are configured during authentication. For example:
```csharp
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
```csharp
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
// Code omitted for brevity
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
// Code omitted for brevity
AuthenticationScheme = "Cookie",
LoginPath = "/Account/Unauthorized/",
AccessDeniedPath = "/Account/Forbidden/",
AutomaticAuthenticate = false
});
app.UseCookieAuthentication(new CookieAuthenticationOptions()
{
AuthenticationScheme = "Cookie",
LoginPath = "/Account/Unauthorized/",
AccessDeniedPath = "/Account/Forbidden/",
AutomaticAuthenticate = false
});
app.UseJwtBearerAuthentication(new JwtBearerOptions()
{
AuthenticationScheme = "Bearer",
AutomaticAuthenticate = false
});
```
app.UseJwtBearerAuthentication(new JwtBearerOptions()
{
AuthenticationScheme = "Bearer",
AutomaticAuthenticate = false
});
```
In the preceding code, two authentication middlewares have been added: one for cookies and one for bearer.