mirror of
https://github.com/bitwarden/server.git
synced 2025-06-09 12:40:32 -05:00
PM-20532 - SendClientBuilder.cs and GlobalSettings.cs - wire up SendAccessTokenLifetimeInMinutes as global setting and consume in send client builder
This commit is contained in:
parent
bb15deda3d
commit
af934a2bee
@ -87,6 +87,8 @@ public class GlobalSettings : IGlobalSettings
|
|||||||
public virtual IPhishingDomainSettings PhishingDomain { get; set; } = new PhishingDomainSettings();
|
public virtual IPhishingDomainSettings PhishingDomain { get; set; } = new PhishingDomainSettings();
|
||||||
|
|
||||||
public virtual bool EnableEmailVerification { get; set; }
|
public virtual bool EnableEmailVerification { get; set; }
|
||||||
|
|
||||||
|
public virtual int SendAccessTokenLifetimeInMinutes { get; set; } = 5;
|
||||||
public virtual string KdfDefaultHashKey { get; set; }
|
public virtual string KdfDefaultHashKey { get; set; }
|
||||||
public virtual string PricingUri { get; set; }
|
public virtual string PricingUri { get; set; }
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public static class SendClientBuilder
|
|||||||
{
|
{
|
||||||
ClientId = BitwardenClient.Send,
|
ClientId = BitwardenClient.Send,
|
||||||
AllowedGrantTypes = new[] { SendAccessGrantValidator.GrantType },
|
AllowedGrantTypes = new[] { SendAccessGrantValidator.GrantType },
|
||||||
AccessTokenLifetime = 60 * 5, // 5 minutes // TODO: convert this to a global setting
|
AccessTokenLifetime = 60 * globalSettings.SendAccessTokenLifetimeInMinutes,
|
||||||
|
|
||||||
// Do not allow refresh tokens to be issued.
|
// Do not allow refresh tokens to be issued.
|
||||||
AllowOfflineAccess = false,
|
AllowOfflineAccess = false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user