Skip to content

Commit

Permalink
【Add】添加IdentitServer4的一些配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
KawhiWei committed Jan 23, 2021
1 parent ee681ea commit 934ee44
Show file tree
Hide file tree
Showing 3 changed files with 837 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/Destiny.Core.Flow/IdentityServer4/GrantType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace Destiny.Core.Flow
{
public static class GrantType
{
public const string Implicit = "implicit";

public const string Hybrid = "hybrid";

public const string AuthorizationCode = "authorization_code";

public const string ClientCredentials = "client_credentials";

public const string ResourceOwnerPassword = "password";

public const string DeviceFlow = "urn:ietf:params:oauth:grant-type:device_code";
}
}
43 changes: 43 additions & 0 deletions src/Destiny.Core.Flow/IdentityServer4/GrantTypes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.


using System.Collections.Generic;

#pragma warning disable 1591

namespace Destiny.Core.Flow
{
public class GrantTypes
{
public static ICollection<string> Implicit =>
new[] { GrantType.Implicit };

public static ICollection<string> ImplicitAndClientCredentials =>
new[] { GrantType.Implicit, GrantType.ClientCredentials };

public static ICollection<string> Code =>
new[] { GrantType.AuthorizationCode };

public static ICollection<string> CodeAndClientCredentials =>
new[] { GrantType.AuthorizationCode, GrantType.ClientCredentials };

public static ICollection<string> Hybrid =>
new[] { GrantType.Hybrid };

public static ICollection<string> HybridAndClientCredentials =>
new[] { GrantType.Hybrid, GrantType.ClientCredentials };

public static ICollection<string> ClientCredentials =>
new[] { GrantType.ClientCredentials };

public static ICollection<string> ResourceOwnerPassword =>
new[] { GrantType.ResourceOwnerPassword };

public static ICollection<string> ResourceOwnerPasswordAndClientCredentials =>
new[] { GrantType.ResourceOwnerPassword, GrantType.ClientCredentials };

public static ICollection<string> DeviceFlow =>
new[] { GrantType.DeviceFlow };
}
}
Loading

0 comments on commit 934ee44

Please sign in to comment.