1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-22 21:51:22 +01:00

Dont run custom token logic for org based client_ids explicitly (#992)

* Dont run custom token logic for org based client_ids explicitly

* org to organization
This commit is contained in:
Addison Beck 2020-11-13 10:07:49 -05:00 committed by GitHub
parent e35faf1335
commit fefa0e2dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,8 @@ namespace Bit.Core.IdentityServer
public async Task ValidateAsync(CustomTokenRequestValidationContext context)
{
string[] allowedGrantTypes = { "authorization_code", "client_credentials" };
if (!allowedGrantTypes.Contains(context.Result.ValidatedRequest.GrantType))
if (!allowedGrantTypes.Contains(context.Result.ValidatedRequest.GrantType) ||
context.Result.ValidatedRequest.ClientId.StartsWith("organization"))
{
return;
}