1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-05 11:42:22 -05:00

formatting

This commit is contained in:
Kyle Spearrin 2017-01-25 00:35:52 -05:00
parent d1a5421f69
commit ac18893d67

View File

@ -82,7 +82,8 @@ namespace Bit.Api.IdentityServer
return; return;
} }
if(!twoFactorRequest || await _userManager.VerifyTwoFactorTokenAsync(user, twoFactorProvider, twoFactorToken)) if(!twoFactorRequest ||
await _userManager.VerifyTwoFactorTokenAsync(user, twoFactorProvider, twoFactorToken))
{ {
var device = await SaveDeviceAsync(user, context); var device = await SaveDeviceAsync(user, context);
BuildSuccessResult(user, context, device); BuildSuccessResult(user, context, device);
@ -100,8 +101,10 @@ namespace Bit.Api.IdentityServer
{ {
var httpContext = _httpContextAccessor.HttpContext; var httpContext = _httpContextAccessor.HttpContext;
_userManager = httpContext.RequestServices.GetRequiredService<UserManager<User>>(); _userManager = httpContext.RequestServices.GetRequiredService<UserManager<User>>();
_identityOptions = httpContext.RequestServices.GetRequiredService<IOptions<IdentityOptions>>()?.Value ?? new IdentityOptions(); _identityOptions =
_jwtBearerIdentityOptions = httpContext.RequestServices.GetRequiredService<IOptions<JwtBearerIdentityOptions>>()?.Value; httpContext.RequestServices.GetRequiredService<IOptions<IdentityOptions>>()?.Value ?? new IdentityOptions();
_jwtBearerIdentityOptions =
httpContext.RequestServices.GetRequiredService<IOptions<JwtBearerIdentityOptions>>()?.Value;
_jwtBearerOptions = Core.Identity.JwtBearerAppBuilderExtensions.BuildJwtBearerOptions(_jwtBearerIdentityOptions); _jwtBearerOptions = Core.Identity.JwtBearerAppBuilderExtensions.BuildJwtBearerOptions(_jwtBearerIdentityOptions);
} }