1
0
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:
Jared Snider 2025-06-02 18:07:24 -04:00
parent bb15deda3d
commit af934a2bee
No known key found for this signature in database
GPG Key ID: A149DDD612516286
2 changed files with 3 additions and 1 deletions

View File

@ -87,6 +87,8 @@ public class GlobalSettings : IGlobalSettings
public virtual IPhishingDomainSettings PhishingDomain { get; set; } = new PhishingDomainSettings();
public virtual bool EnableEmailVerification { get; set; }
public virtual int SendAccessTokenLifetimeInMinutes { get; set; } = 5;
public virtual string KdfDefaultHashKey { get; set; }
public virtual string PricingUri { get; set; }

View File

@ -13,7 +13,7 @@ public static class SendClientBuilder
{
ClientId = BitwardenClient.Send,
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.
AllowOfflineAccess = false,