Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99545454
PhabricatorAuthProviderOAuthAmazon.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jan 25, 07:59
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 27, 07:59 (2 d)
Engine
blob
Format
Raw Data
Handle
23819397
Attached To
rPH Phabricator
PhabricatorAuthProviderOAuthAmazon.php
View Options
<?php
final
class
PhabricatorAuthProviderOAuthAmazon
extends
PhabricatorAuthProviderOAuth
{
public
function
getProviderName
()
{
return
pht
(
'Amazon'
);
}
public
function
getConfigurationHelp
()
{
$login_uri
=
PhabricatorEnv
::
getURI
(
$this
->
getLoginURI
());
$uri
=
new
PhutilURI
(
PhabricatorEnv
::
getProductionURI
(
'/'
));
$https_note
=
null
;
if
(
$uri
->
getProtocol
()
!==
'https'
)
{
$https_note
=
pht
(
'NOTE: Amazon **requires** HTTPS, but your Phabricator install does '
.
'not use HTTPS. **You will not be able to add Amazon as an '
.
'authentication provider until you configure HTTPS on this install**.'
);
}
return
pht
(
"%s
\n\n
"
.
"To configure Amazon OAuth, create a new 'API Project' here:"
.
"
\n\n
"
.
"http://login.amazon.com/manageApps"
.
"
\n\n
"
.
"Use these settings:"
.
"
\n\n
"
.
" - **Allowed Return URLs:** Add this: `%s`"
.
"
\n\n
"
.
"After completing configuration, copy the **Client ID** and "
.
"**Client Secret** to the fields above."
,
$https_note
,
$login_uri
);
}
protected
function
newOAuthAdapter
()
{
return
new
PhutilAuthAdapterOAuthAmazon
();
}
protected
function
getLoginIcon
()
{
return
'Amazon'
;
}
}
Event Timeline
Log In to Comment