Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107906488
PhabricatorAuthProviderOAuthAsana.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
Fri, Apr 11, 17:16
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Apr 13, 17:16 (2 d)
Engine
blob
Format
Raw Data
Handle
25495690
Attached To
rPH Phabricator
PhabricatorAuthProviderOAuthAsana.php
View Options
<?php
final
class
PhabricatorAuthProviderOAuthAsana
extends
PhabricatorAuthProviderOAuth
{
public
function
getProviderName
()
{
return
pht
(
'Asana'
);
}
public
function
getConfigurationHelp
()
{
$app_uri
=
PhabricatorEnv
::
getProductionURI
(
'/'
);
$login_uri
=
PhabricatorEnv
::
getURI
(
$this
->
getLoginURI
());
return
pht
(
"To configure Asana OAuth, create a new application here:"
.
"
\n\n
"
.
"https://app.asana.com/-/account_api"
.
"
\n\n
"
.
"When creating your application, use these settings:"
.
"
\n\n
"
.
" - **App URL:** Set this to: `%s`
\n
"
.
" - **Redirect URL:** Set this to: `%s`"
.
"
\n\n
"
.
"After completing configuration, copy the **Client ID** and "
.
"**Client Secret** to the fields above."
,
$app_uri
,
$login_uri
);
}
protected
function
newOAuthAdapter
()
{
return
new
PhutilAuthAdapterOAuthAsana
();
}
protected
function
getLoginIcon
()
{
return
'Asana'
;
}
public
static
function
getAsanaProvider
()
{
$providers
=
self
::
getAllEnabledProviders
();
foreach
(
$providers
as
$provider
)
{
if
(
$provider
instanceof
PhabricatorAuthProviderOAuthAsana
)
{
return
$provider
;
}
}
return
null
;
}
}
Event Timeline
Log In to Comment