Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97905741
PhabricatorAuthProviderOAuthDisqus.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
Tue, Jan 7, 10:18
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jan 9, 10:18 (2 d)
Engine
blob
Format
Raw Data
Handle
23437496
Attached To
rPH Phabricator
PhabricatorAuthProviderOAuthDisqus.php
View Options
<?php
final
class
PhabricatorAuthProviderOAuthDisqus
extends
PhabricatorAuthProviderOAuth
{
public
function
getProviderName
()
{
return
pht
(
'Disqus'
);
}
protected
function
newOAuthAdapter
()
{
return
new
PhutilAuthAdapterOAuthDisqus
();
}
protected
function
getLoginIcon
()
{
return
'Disqus'
;
}
public
function
isEnabled
()
{
return
parent
::
isEnabled
()
&&
PhabricatorEnv
::
getEnvConfig
(
'disqus.auth-enabled'
);
}
protected
function
getOAuthClientID
()
{
return
PhabricatorEnv
::
getEnvConfig
(
'disqus.application-id'
);
}
protected
function
getOAuthClientSecret
()
{
$secret
=
PhabricatorEnv
::
getEnvConfig
(
'disqus.application-secret'
);
if
(
$secret
)
{
return
new
PhutilOpaqueEnvelope
(
$secret
);
}
return
null
;
}
public
function
shouldAllowLogin
()
{
return
true
;
}
public
function
shouldAllowRegistration
()
{
return
PhabricatorEnv
::
getEnvConfig
(
'disqus.registration-enabled'
);
}
public
function
shouldAllowAccountLink
()
{
return
true
;
}
public
function
shouldAllowAccountUnlink
()
{
return
!
PhabricatorEnv
::
getEnvConfig
(
'disqus.auth-permanent'
);
}
}
Event Timeline
Log In to Comment