[Tizen] Add BuildTools 2.1.0-rc1-02804-05
[platform/upstream/coreclr.git] / Tools / dotnetcli / sdk / NuGetFallbackFolder / microsoft.identitymodel.clients.activedirectory / 3.14.1 / src / src / ADAL.PCL / Utilities / OAuthConstants.cs
1 //------------------------------------------------------------------------------
2 //
3 // Copyright (c) Microsoft Corporation.
4 // All rights reserved.
5 //
6 // This code is licensed under the MIT License.
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files(the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions :
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 // THE SOFTWARE.
25 //
26 //------------------------------------------------------------------------------
27
28 namespace Microsoft.IdentityModel.Clients.ActiveDirectory
29 {
30     internal class OAuthParameter
31     {
32         public const string ResponseType = "response_type";
33         public const string GrantType = "grant_type";
34         public const string ClientId = "client_id";
35         public const string ClientSecret = "client_secret";
36         public const string ClientAssertion = "client_assertion";
37         public const string ClientAssertionType = "client_assertion_type";
38         public const string RefreshToken = "refresh_token";
39         public const string RedirectUri = "redirect_uri";
40         public const string Resource = "resource";
41         public const string Code = "code";
42         public const string Scope = "scope";
43         public const string Assertion = "assertion";
44         public const string RequestedTokenUse = "requested_token_use";
45         public const string Username = "username";
46         public const string Password = "password";
47
48         public const string HasChrome = "haschrome";
49         public const string LoginHint = "login_hint"; // login_hint is not standard oauth2 parameter
50         public const string CorrelationId = OAuthHeader.CorrelationId; // correlation id is not standard oauth2 parameter
51         public const string Prompt = "prompt"; // prompt is not standard oauth2 parameter
52     }
53
54     internal class OAuthGrantType
55     {
56         public const string AuthorizationCode = "authorization_code";
57         public const string RefreshToken = "refresh_token";
58         public const string ClientCredentials = "client_credentials";
59         public const string Saml11Bearer = "urn:ietf:params:oauth:grant-type:saml1_1-bearer";
60         public const string Saml20Bearer = "urn:ietf:params:oauth:grant-type:saml2-bearer";
61         public const string JwtBearer = "urn:ietf:params:oauth:grant-type:jwt-bearer";
62         public const string Password = "password";
63         public const string DeviceCode = "device_code";
64     }
65
66     internal class OAuthResponseType
67     {
68         public const string Code = "code";
69     }
70
71     internal class OAuthAssertionType
72     {
73         public const string JwtBearer = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
74     }
75
76     internal class OAuthRequestedTokenUse
77     {
78         public const string OnBehalfOf = "on_behalf_of";
79     }
80
81     internal class OAuthHeader
82     {
83         public const string CorrelationId = "client-request-id";
84         public const string RequestCorrelationIdInResponse = "return-client-request-id";
85     }
86
87     internal class OAuthError
88     {
89         public const string LoginRequired = "login_required";
90     }
91
92     internal class OAuthValue
93     {
94         public const string ScopeOpenId = "openid";
95     }
96
97     internal class PromptValue
98     {
99         public const string Login = "login";
100         public const string RefreshSession = "refresh_session";
101
102         // The behavior of this value is identical to prompt=none for managed users; However, for federated users, AAD
103         // redirects to ADFS as it cannot determine in advance whether ADFS can login user silently (e.g. via WIA) or not.
104         public const string AttemptNone = "attempt_none";
105     }
106 }