From 972657f982e2f00dcc61dfa11301038f2c337df3 Mon Sep 17 00:00:00 2001 From: Justin Baur <136baur@gmail.com> Date: Fri, 22 Apr 2022 16:40:38 -0400 Subject: [PATCH] [PS-284] Allow installation clients to not need a user. (#1968) * Allow installation clients to not need a user. * Run formatting --- src/Core/IdentityServer/CustomTokenRequestValidator.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Core/IdentityServer/CustomTokenRequestValidator.cs b/src/Core/IdentityServer/CustomTokenRequestValidator.cs index 361983c32..e673c3ff5 100644 --- a/src/Core/IdentityServer/CustomTokenRequestValidator.cs +++ b/src/Core/IdentityServer/CustomTokenRequestValidator.cs @@ -57,8 +57,9 @@ namespace Bit.Core.IdentityServer public async Task ValidateAsync(CustomTokenRequestValidationContext context) { string[] allowedGrantTypes = { "authorization_code", "client_credentials" }; - if (!allowedGrantTypes.Contains(context.Result.ValidatedRequest.GrantType) || - context.Result.ValidatedRequest.ClientId.StartsWith("organization")) + if (!allowedGrantTypes.Contains(context.Result.ValidatedRequest.GrantType) + || context.Result.ValidatedRequest.ClientId.StartsWith("organization") + || context.Result.ValidatedRequest.ClientId.StartsWith("installation")) { return; }