1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

remove cookie auth from useidentity

This commit is contained in:
Kyle Spearrin
2017-10-06 14:02:28 -04:00
parent a78cdf2903
commit 857ad5b194
7 changed files with 59 additions and 12 deletions

View File

@ -85,6 +85,7 @@ namespace Bit.Api
globalSettings.BaseServiceUri.InternalIdentity.StartsWith("https");
options.NameClaimType = ClaimTypes.Email;
options.TokenRetriever = TokenRetrieval.FromAuthorizationHeaderOrQueryString("Bearer", "access_token");
options.SupportedTokens = SupportedTokens.Jwt;
});
services.AddAuthorization(config =>
@ -170,8 +171,7 @@ namespace Bit.Api
}
return e.Level >= LogEventLevel.Error;
})
.AddDebug();
});
// Default Middleware
app.UseDefaultMiddleware(env);
@ -191,6 +191,9 @@ namespace Bit.Api
// Add current context
app.UseMiddleware<CurrentContextMiddleware>();
// Add authentication to the request pipeline.
app.UseAuthentication();
// Add MVC to the request pipeline.
app.UseMvc();
}