mirror of
https://github.com/bitwarden/server.git
synced 2025-07-15 22:57:44 -05:00
implement useapi and apikey
This commit is contained in:
@ -87,11 +87,11 @@ namespace Bit.Core.IdentityServer
|
||||
{
|
||||
ClientId = $"organization.{org.Id}",
|
||||
RequireClientSecret = true,
|
||||
ClientSecrets = { new Secret("secret".Sha256()) }, // TODO: org.ApiKey
|
||||
ClientSecrets = { new Secret(org.ApiKey.Sha256()) },
|
||||
AllowedScopes = new string[] { "api.organization" },
|
||||
AllowedGrantTypes = GrantTypes.ClientCredentials,
|
||||
AccessTokenLifetime = 3600 * 1,
|
||||
Enabled = org.Enabled, // TODO: && org.UseApi
|
||||
Enabled = org.Enabled && org.UseApi,
|
||||
Claims = new List<Claim> { new Claim(JwtClaimTypes.Subject, org.Id.ToString()) }
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user