Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112128321
PhabricatorAuthMFAEditEngineExtension.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
Wed, May 7, 22:30
Size
1 KB
Mime Type
text/x-php
Expires
Fri, May 9, 22:30 (2 d)
Engine
blob
Format
Raw Data
Handle
26010246
Attached To
rPH Phabricator
PhabricatorAuthMFAEditEngineExtension.php
View Options
<?php
final
class
PhabricatorAuthMFAEditEngineExtension
extends
PhabricatorEditEngineExtension
{
const
EXTENSIONKEY
=
'auth.mfa'
;
const
FIELDKEY
=
'mfa'
;
public
function
getExtensionPriority
()
{
return
12000
;
}
public
function
isExtensionEnabled
()
{
return
true
;
}
public
function
getExtensionName
()
{
return
pht
(
'MFA'
);
}
public
function
supportsObject
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
return
true
;
}
public
function
buildCustomEditFields
(
PhabricatorEditEngine
$engine
,
PhabricatorApplicationTransactionInterface
$object
)
{
$mfa_type
=
PhabricatorTransactions
::
TYPE_MFA
;
$viewer
=
$engine
->
getViewer
();
$mfa_field
=
id
(
new
PhabricatorApplyEditField
())
->
setViewer
(
$viewer
)
->
setKey
(
self
::
FIELDKEY
)
->
setLabel
(
pht
(
'MFA'
))
->
setIsFormField
(
false
)
->
setCommentActionLabel
(
pht
(
'Sign With MFA'
))
->
setCommentActionOrder
(
12000
)
->
setActionDescription
(
pht
(
'You will be prompted to provide MFA when you submit.'
))
->
setDescription
(
pht
(
'Sign this transaction group with MFA.'
))
->
setTransactionType
(
$mfa_type
);
return
array
(
$mfa_field
,
);
}
}
Event Timeline
Log In to Comment