-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathDataCenterConstants.cs
More file actions
47 lines (41 loc) · 1.95 KB
/
Copy pathDataCenterConstants.cs
File metadata and controls
47 lines (41 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
namespace Atlassian.Bitbucket.DataCenter
{
public static class DataCenterConstants
{
public static class OAuthScopes
{
public const string PublicRepos = "PUBLIC_REPOS";
public const string RepoWrite = "REPO_WRITE";
public const string RepoRead = "REPO_READ";
}
public static readonly Uri OAuth2RedirectUri = new Uri("http://localhost:34106/");
/// <summary>
/// Supported authentication modes for Bitbucket Server/DC
/// </summary>
public const AuthenticationModes ServerAuthenticationModes = AuthenticationModes.Basic | AuthenticationModes.OAuth;
/// <summary>
/// Bitbucket Server/DC does not have a REST API we can use to trade an OAuth access_token for the owning username.
/// However one is needed to construct the Basic Auth request made by Git HTTP requests, therefore use a hardcoded
/// placeholder for the username.
/// </summary>
public const string OAuthUserName = "OAUTH_USERNAME";
public static class EnvironmentVariables
{
public const string OAuthClientId = "GCM_BITBUCKET_DATACENTER_CLIENTID";
public const string OAuthClientSecret = "GCM_BITBUCKET_DATACENTER_CLIENTSECRET";
public const string OAuthRedirectUri = "GCM_BITBUCKET_DATACENTER_OAUTH_REDIRECTURI";
public const string HttpPath = "GCM_BITBUCKET_DATACENTER_HTTP_PATH";
}
public static class GitConfiguration
{
public static class Credential
{
public const string OAuthClientId = "bitbucketDataCenterOAuthClientId";
public const string OAuthClientSecret = "bitbucketDataCenterOAuthClientSecret";
public const string OAuthRedirectUri = "bitbucketDataCenterOauthRedirectUri";
public const string HttpPath = "bitbucketDataCenterHttpPath";
}
}
}
}