Github is actually GitHub
Test Plan: none Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1557
This commit is contained in:
@@ -359,22 +359,22 @@ return array(
|
|||||||
'facebook.application-secret' => null,
|
'facebook.application-secret' => null,
|
||||||
|
|
||||||
|
|
||||||
// -- Github ---------------------------------------------------------------- //
|
// -- GitHub ---------------------------------------------------------------- //
|
||||||
|
|
||||||
// Can users use Github credentials to login to Phabricator?
|
// Can users use GitHub credentials to login to Phabricator?
|
||||||
'github.auth-enabled' => false,
|
'github.auth-enabled' => false,
|
||||||
|
|
||||||
// Can users use Github credentials to create new Phabricator accounts?
|
// Can users use GitHub credentials to create new Phabricator accounts?
|
||||||
'github.registration-enabled' => true,
|
'github.registration-enabled' => true,
|
||||||
|
|
||||||
// Are Github accounts permanently linked to Phabricator accounts, or can
|
// Are GitHub accounts permanently linked to Phabricator accounts, or can
|
||||||
// the user unlink them?
|
// the user unlink them?
|
||||||
'github.auth-permanent' => false,
|
'github.auth-permanent' => false,
|
||||||
|
|
||||||
// The Github "Client ID" to use for Github API access.
|
// The GitHub "Client ID" to use for GitHub API access.
|
||||||
'github.application-id' => null,
|
'github.application-id' => null,
|
||||||
|
|
||||||
// The Github "Secret" to use for Github API access.
|
// The GitHub "Secret" to use for GitHub API access.
|
||||||
'github.application-secret' => null,
|
'github.application-secret' => null,
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -579,7 +579,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorOAuthLoginController' => 'applications/auth/controller/oauth',
|
'PhabricatorOAuthLoginController' => 'applications/auth/controller/oauth',
|
||||||
'PhabricatorOAuthProvider' => 'applications/auth/oauth/provider/base',
|
'PhabricatorOAuthProvider' => 'applications/auth/oauth/provider/base',
|
||||||
'PhabricatorOAuthProviderFacebook' => 'applications/auth/oauth/provider/facebook',
|
'PhabricatorOAuthProviderFacebook' => 'applications/auth/oauth/provider/facebook',
|
||||||
'PhabricatorOAuthProviderGithub' => 'applications/auth/oauth/provider/github',
|
'PhabricatorOAuthProviderGitHub' => 'applications/auth/oauth/provider/github',
|
||||||
'PhabricatorOAuthProviderGoogle' => 'applications/auth/oauth/provider/google',
|
'PhabricatorOAuthProviderGoogle' => 'applications/auth/oauth/provider/google',
|
||||||
'PhabricatorOAuthRegistrationController' => 'applications/auth/controller/oauthregistration/base',
|
'PhabricatorOAuthRegistrationController' => 'applications/auth/controller/oauthregistration/base',
|
||||||
'PhabricatorOAuthUnlinkController' => 'applications/auth/controller/unlink',
|
'PhabricatorOAuthUnlinkController' => 'applications/auth/controller/unlink',
|
||||||
@@ -1285,7 +1285,7 @@ phutil_register_library_map(array(
|
|||||||
'PhabricatorOAuthFailureView' => 'AphrontView',
|
'PhabricatorOAuthFailureView' => 'AphrontView',
|
||||||
'PhabricatorOAuthLoginController' => 'PhabricatorAuthController',
|
'PhabricatorOAuthLoginController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorOAuthProviderFacebook' => 'PhabricatorOAuthProvider',
|
'PhabricatorOAuthProviderFacebook' => 'PhabricatorOAuthProvider',
|
||||||
'PhabricatorOAuthProviderGithub' => 'PhabricatorOAuthProvider',
|
'PhabricatorOAuthProviderGitHub' => 'PhabricatorOAuthProvider',
|
||||||
'PhabricatorOAuthProviderGoogle' => 'PhabricatorOAuthProvider',
|
'PhabricatorOAuthProviderGoogle' => 'PhabricatorOAuthProvider',
|
||||||
'PhabricatorOAuthRegistrationController' => 'PhabricatorAuthController',
|
'PhabricatorOAuthRegistrationController' => 'PhabricatorAuthController',
|
||||||
'PhabricatorOAuthUnlinkController' => 'PhabricatorAuthController',
|
'PhabricatorOAuthUnlinkController' => 'PhabricatorAuthController',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2011 Facebook, Inc.
|
* Copyright 2012 Facebook, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -93,7 +93,7 @@ abstract class PhabricatorOAuthProvider {
|
|||||||
$class = 'PhabricatorOAuthProviderFacebook';
|
$class = 'PhabricatorOAuthProviderFacebook';
|
||||||
break;
|
break;
|
||||||
case self::PROVIDER_GITHUB:
|
case self::PROVIDER_GITHUB:
|
||||||
$class = 'PhabricatorOAuthProviderGithub';
|
$class = 'PhabricatorOAuthProviderGitHub';
|
||||||
break;
|
break;
|
||||||
case self::PROVIDER_GOOGLE:
|
case self::PROVIDER_GOOGLE:
|
||||||
$class = 'PhabricatorOAuthProviderGoogle';
|
$class = 'PhabricatorOAuthProviderGoogle';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2011 Facebook, Inc.
|
* Copyright 2012 Facebook, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class PhabricatorOAuthProviderGithub extends PhabricatorOAuthProvider {
|
class PhabricatorOAuthProviderGitHub extends PhabricatorOAuthProvider {
|
||||||
|
|
||||||
private $userData;
|
private $userData;
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ class PhabricatorOAuthProviderGithub extends PhabricatorOAuthProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getProviderName() {
|
public function getProviderName() {
|
||||||
return 'Github';
|
return 'GitHub';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isProviderEnabled() {
|
public function isProviderEnabled() {
|
||||||
@@ -12,4 +12,4 @@ phutil_require_module('phabricator', 'infrastructure/env');
|
|||||||
phutil_require_module('phutil', 'utils');
|
phutil_require_module('phutil', 'utils');
|
||||||
|
|
||||||
|
|
||||||
phutil_require_source('PhabricatorOAuthProviderGithub.php');
|
phutil_require_source('PhabricatorOAuthProviderGitHub.php');
|
||||||
|
|||||||
Reference in New Issue
Block a user