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

token retrieval from header or qs

This commit is contained in:
Kyle Spearrin
2018-03-09 11:02:31 -05:00
parent 45dd2dc909
commit 64277f54f8
2 changed files with 34 additions and 0 deletions

View File

@ -17,6 +17,7 @@ using Bit.Core.Utilities;
using IdentityModel;
using IdentityServer4.AccessTokenValidation;
using jsreport.AspNetCore;
using Bit.Core.IdentityServer;
namespace Bit.Api
{
@ -79,6 +80,7 @@ namespace Bit.Api
options.Authority = globalSettings.BaseServiceUri.InternalIdentity;
options.RequireHttpsMetadata = !Environment.IsDevelopment() &&
globalSettings.BaseServiceUri.InternalIdentity.StartsWith("https");
options.TokenRetriever = TokenRetrieval.FromAuthorizationHeaderOrQueryString();
options.NameClaimType = ClaimTypes.Email;
options.SupportedTokens = SupportedTokens.Jwt;
});