1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-23 17:07:42 +01:00

connector client

This commit is contained in:
Kyle Spearrin 2017-05-12 13:43:42 -04:00
parent 76664c8427
commit 5a6e189e67

View File

@ -12,7 +12,8 @@ namespace Bit.Core.IdentityServer
new ApiClient("mobile", 90, 1),
new ApiClient("web", 1, 1),
new ApiClient("browser", 30, 1),
new ApiClient("desktop", 30, 1)
new ApiClient("desktop", 30, 1),
new ApiClient("connector", 30, 24)
};
}
@ -22,7 +23,7 @@ namespace Bit.Core.IdentityServer
string id,
int refreshTokenSlidingDays,
int accessTokenLifetimeHours,
string[] additionalScopes = null)
string[] scopes = null)
{
ClientId = id;
RequireClientSecret = false;
@ -35,10 +36,9 @@ namespace Bit.Core.IdentityServer
AccessTokenLifetime = 3600 * accessTokenLifetimeHours;
AllowOfflineAccess = true;
var scopes = new List<string> { "api" };
if(additionalScopes != null)
if(scopes == null)
{
scopes.AddRange(additionalScopes);
scopes = new string[] { "api" };
}
AllowedScopes = scopes;
}