1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-11 12:53:50 -05:00

added installation id to current context.

This commit is contained in:
Kyle Spearrin
2017-08-10 15:26:05 -04:00
parent e538817eb6
commit 0ad76a5487
5 changed files with 55 additions and 17 deletions

View File

@ -4,6 +4,8 @@ using IdentityServer4.Models;
using System.Collections.Generic;
using Bit.Core.Repositories;
using System;
using System.Security.Claims;
using IdentityModel;
namespace Bit.Core.IdentityServer
{
@ -37,7 +39,8 @@ namespace Bit.Core.IdentityServer
AllowedScopes = new string[] { "api.push" },
AllowedGrantTypes = GrantTypes.ClientCredentials,
AccessTokenLifetime = 3600 * 24,
Enabled = installation.Enabled
Enabled = installation.Enabled,
Claims = new List<Claim> { new Claim(JwtClaimTypes.Subject, installation.Id.ToString()) }
};
}
}