mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
[PM-5800] Remove feature flag checks for PasswordlessLogin (#3713)
* Removed feature flag checks for PasswordlessLogin * Removed unused reference.
This commit is contained in:
parent
789e266791
commit
1a3146f776
@ -13,7 +13,6 @@ using Bit.Core.Auth.UserFeatures.WebAuthnLogin;
|
|||||||
using Bit.Core.Exceptions;
|
using Bit.Core.Exceptions;
|
||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
using Bit.Core.Tokens;
|
using Bit.Core.Tokens;
|
||||||
using Bit.Core.Utilities;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
@ -21,7 +20,6 @@ namespace Bit.Api.Auth.Controllers;
|
|||||||
|
|
||||||
[Route("webauthn")]
|
[Route("webauthn")]
|
||||||
[Authorize("Web")]
|
[Authorize("Web")]
|
||||||
[RequireFeature(FeatureFlagKeys.PasswordlessLogin)]
|
|
||||||
public class WebAuthnController : Controller
|
public class WebAuthnController : Controller
|
||||||
{
|
{
|
||||||
private readonly IUserService _userService;
|
private readonly IUserService _userService;
|
||||||
|
@ -12,7 +12,6 @@ using Bit.Core.Models.Data;
|
|||||||
using Bit.Core.Repositories;
|
using Bit.Core.Repositories;
|
||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
using Bit.Core.Tokens;
|
using Bit.Core.Tokens;
|
||||||
using Bit.Core.Utilities;
|
|
||||||
using Bit.SharedWeb.Utilities;
|
using Bit.SharedWeb.Utilities;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
@ -85,7 +84,6 @@ public class AccountsController : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("webauthn/assertion-options")]
|
[HttpGet("webauthn/assertion-options")]
|
||||||
[RequireFeature(FeatureFlagKeys.PasswordlessLogin)]
|
|
||||||
public WebAuthnLoginAssertionOptionsResponseModel GetWebAuthnLoginAssertionOptions()
|
public WebAuthnLoginAssertionOptionsResponseModel GetWebAuthnLoginAssertionOptions()
|
||||||
{
|
{
|
||||||
var options = _getWebAuthnLoginCredentialAssertionOptionsCommand.GetWebAuthnLoginCredentialAssertionOptions();
|
var options = _getWebAuthnLoginCredentialAssertionOptionsCommand.GetWebAuthnLoginCredentialAssertionOptions();
|
||||||
|
@ -65,12 +65,6 @@ public class WebAuthnGrantValidator : BaseRequestValidator<ExtensionGrantValidat
|
|||||||
|
|
||||||
public async Task ValidateAsync(ExtensionGrantValidationContext context)
|
public async Task ValidateAsync(ExtensionGrantValidationContext context)
|
||||||
{
|
{
|
||||||
if (!FeatureService.IsEnabled(FeatureFlagKeys.PasswordlessLogin))
|
|
||||||
{
|
|
||||||
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var rawToken = context.Request.Raw.Get("token");
|
var rawToken = context.Request.Raw.Get("token");
|
||||||
var rawDeviceResponse = context.Request.Raw.Get("deviceResponse");
|
var rawDeviceResponse = context.Request.Raw.Get("deviceResponse");
|
||||||
if (string.IsNullOrWhiteSpace(rawToken) || string.IsNullOrWhiteSpace(rawDeviceResponse))
|
if (string.IsNullOrWhiteSpace(rawToken) || string.IsNullOrWhiteSpace(rawDeviceResponse))
|
||||||
|
Loading…
Reference in New Issue
Block a user