1
0
mirror of https://github.com/bitwarden/server synced 2026-01-07 02:53:38 +00:00

added user orgs to claims

This commit is contained in:
Kyle Spearrin
2017-04-05 15:31:33 -04:00
parent fee9bde12f
commit a474449354
7 changed files with 81 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ namespace Bit.Api.IdentityServer
public class ApiClient : Client
{
public ApiClient(string id)
public ApiClient(string id, string[] additionalScopes = null)
{
ClientId = id;
RequireClientSecret = false;
@@ -26,7 +26,13 @@ namespace Bit.Api.IdentityServer
UpdateAccessTokenClaimsOnRefresh = true;
AccessTokenLifetime = 60 * 60; // 1 hour
AllowOfflineAccess = true;
AllowedScopes = new string[] { "api" };
var scopes = new List<string> { "api" };
if(additionalScopes != null)
{
scopes.AddRange(additionalScopes);
}
AllowedScopes = scopes;
}
}
}