-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
837 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }; | ||
} | ||
} |
Oops, something went wrong.