mirror of
https://github.com/bitwarden/server.git
synced 2024-11-25 12:45:18 +01:00
[PS-284] Allow installation clients to not need a user. (#1968)
* Allow installation clients to not need a user. * Run formatting
This commit is contained in:
parent
669d44c170
commit
972657f982
@ -57,8 +57,9 @@ namespace Bit.Core.IdentityServer
|
|||||||
public async Task ValidateAsync(CustomTokenRequestValidationContext context)
|
public async Task ValidateAsync(CustomTokenRequestValidationContext context)
|
||||||
{
|
{
|
||||||
string[] allowedGrantTypes = { "authorization_code", "client_credentials" };
|
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"))
|
|| context.Result.ValidatedRequest.ClientId.StartsWith("organization")
|
||||||
|
|| context.Result.ValidatedRequest.ClientId.StartsWith("installation"))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user