Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93648624
PhabricatorAuthFactor.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, Nov 30, 10:33
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Dec 2, 10:33 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22683090
Attached To
rPH Phabricator
PhabricatorAuthFactor.php
View Options
<?php
abstract
class
PhabricatorAuthFactor
extends
Phobject
{
abstract
public
function
getFactorName
();
abstract
public
function
getFactorKey
();
abstract
public
function
getFactorDescription
();
abstract
public
function
processAddFactorForm
(
AphrontFormView
$form
,
AphrontRequest
$request
,
PhabricatorUser
$user
);
abstract
public
function
renderValidateFactorForm
(
PhabricatorAuthFactorConfig
$config
,
AphrontFormView
$form
,
PhabricatorUser
$viewer
,
$validation_result
);
abstract
public
function
processValidateFactorForm
(
PhabricatorAuthFactorConfig
$config
,
PhabricatorUser
$viewer
,
AphrontRequest
$request
);
public
function
isFactorValid
(
PhabricatorAuthFactorConfig
$config
,
$validation_result
)
{
return
(
idx
(
$validation_result
,
'valid'
)
===
true
);
}
public
function
getParameterName
(
PhabricatorAuthFactorConfig
$config
,
$name
)
{
return
'authfactor.'
.
$config
->
getID
().
'.'
.
$name
;
}
public
static
function
getAllFactors
()
{
return
id
(
new
PhutilClassMapQuery
())
->
setAncestorClass
(
__CLASS__
)
->
setUniqueMethod
(
'getFactorKey'
)
->
execute
();
}
protected
function
newConfigForUser
(
PhabricatorUser
$user
)
{
return
id
(
new
PhabricatorAuthFactorConfig
())
->
setUserPHID
(
$user
->
getPHID
())
->
setFactorKey
(
$this
->
getFactorKey
());
}
}
Event Timeline
Log In to Comment