mirror of
https://github.com/bitwarden/server.git
synced 2026-02-02 07:03:11 +08:00
31 lines
990 B
C#
31 lines
990 B
C#
using IdentityModel;
|
|
using IdentityServer4.Models;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Bit.Core.IdentityServer
|
|
{
|
|
public class ApiResources
|
|
{
|
|
public static IEnumerable<ApiResource> GetApiResources()
|
|
{
|
|
return new List<ApiResource>
|
|
{
|
|
new ApiResource("api", new string[] {
|
|
JwtClaimTypes.Name,
|
|
JwtClaimTypes.Email,
|
|
JwtClaimTypes.EmailVerified,
|
|
"sstamp", // security stamp
|
|
"premium",
|
|
"device",
|
|
"orgowner",
|
|
"orgadmin",
|
|
"orguser"
|
|
}),
|
|
new ApiResource("internal", new string[] { JwtClaimTypes.Subject }),
|
|
new ApiResource("api.push", new string[] { JwtClaimTypes.Subject }),
|
|
new ApiResource("api.licensing", new string[] { JwtClaimTypes.Subject })
|
|
};
|
|
}
|
|
}
|
|
}
|