Taylohtio/IDP/identityserver/Config/Clients.cs

51 lines
1.6 KiB
C#

using IdentityServer3.Core.Models;
using System.Collections.Generic;
namespace IdentityServer.Config
{
public class Clients
{
public static List<Client> Get()
{
return new List<Client>
{
new Client
{
ClientName = "Silicon-only Client",
ClientId = "webapi",
Enabled = true,
AccessTokenType = AccessTokenType.Reference,
Flow = Flows.ClientCredentials,
ClientSecrets = new List<Secret>
{
new Secret("F621F470-9731-4A25-80EF-67A6F7C5F4B8".Sha256())
},
AllowedScopes = new List<string>
{
"api1",
"read",
"write"
}
},
new Client
{
ClientName = "Silicon on behalf of Carbon Client",
ClientId = "carbon",
Enabled = true,
AccessTokenType = AccessTokenType.Jwt,
AccessTokenLifetime = 3600,
Flow = Flows.ResourceOwner,
ClientSecrets = new List<Secret>
{
new Secret("21B5F798-BE55-42BC-8AA8-0025B903DC3B".Sha256())
},
AllowedScopes = new List<string>
{
"api1"
}
},
};
}
}
}