2017-06-06 23:19:42 -04:00
|
|
|
|
using IdentityModel;
|
|
|
|
|
|
using IdentityServer4.Models;
|
2017-01-11 00:34:16 -05:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
2017-05-05 16:11:50 -04:00
|
|
|
|
namespace Bit.Core.IdentityServer
|
2017-01-11 00:34:16 -05:00
|
|
|
|
{
|
2017-01-11 21:46:36 -05:00
|
|
|
|
public class ApiResources
|
2017-01-11 00:34:16 -05:00
|
|
|
|
{
|
|
|
|
|
|
public static IEnumerable<ApiResource> GetApiResources()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new List<ApiResource>
|
|
|
|
|
|
{
|
2017-03-09 20:30:19 -05:00
|
|
|
|
new ApiResource("api", new string[] {
|
2017-06-06 23:19:42 -04:00
|
|
|
|
JwtClaimTypes.Name,
|
|
|
|
|
|
JwtClaimTypes.Email,
|
|
|
|
|
|
JwtClaimTypes.EmailVerified,
|
2017-01-24 22:15:21 -05:00
|
|
|
|
"sstamp", // security stamp
|
2017-07-01 23:20:30 -04:00
|
|
|
|
"premium",
|
2017-04-05 15:31:33 -04:00
|
|
|
|
"device",
|
|
|
|
|
|
"orgowner",
|
|
|
|
|
|
"orgadmin",
|
|
|
|
|
|
"orguser"
|
2017-08-10 14:39:11 -04:00
|
|
|
|
}),
|
2018-08-16 12:22:20 -04:00
|
|
|
|
new ApiResource("internal", new string[] { JwtClaimTypes.Subject }),
|
2017-08-30 11:23:55 -04:00
|
|
|
|
new ApiResource("api.push", new string[] { JwtClaimTypes.Subject }),
|
|
|
|
|
|
new ApiResource("api.licensing", new string[] { JwtClaimTypes.Subject })
|
2017-01-11 00:34:16 -05:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|