Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92685830
PhabricatorAuthFactorResult.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, Nov 22, 18:33
Size
2 KB
Mime Type
text/x-php
Expires
Sun, Nov 24, 18:33 (2 d)
Engine
blob
Format
Raw Data
Handle
22486994
Attached To
rPH Phabricator
PhabricatorAuthFactorResult.php
View Options
<?php
final
class
PhabricatorAuthFactorResult
extends
Phobject
{
private
$answeredChallenge
;
private
$isWait
=
false
;
private
$isError
=
false
;
private
$isContinue
=
false
;
private
$errorMessage
;
private
$value
;
private
$issuedChallenges
=
array
();
public
function
setAnsweredChallenge
(
PhabricatorAuthChallenge
$challenge
)
{
if
(!
$challenge
->
getIsAnsweredChallenge
())
{
throw
new
PhutilInvalidStateException
(
'markChallengeAsAnswered'
);
}
if
(
$challenge
->
getIsCompleted
())
{
throw
new
Exception
(
pht
(
'A completed challenge was provided as an answered challenge. '
.
'The underlying factor is implemented improperly, challenges '
.
'may not be reused.'
));
}
$this
->
answeredChallenge
=
$challenge
;
return
$this
;
}
public
function
getAnsweredChallenge
()
{
return
$this
->
answeredChallenge
;
}
public
function
getIsValid
()
{
return
(
bool
)
$this
->
getAnsweredChallenge
();
}
public
function
setIsWait
(
$is_wait
)
{
$this
->
isWait
=
$is_wait
;
return
$this
;
}
public
function
getIsWait
()
{
return
$this
->
isWait
;
}
public
function
setIsError
(
$is_error
)
{
$this
->
isError
=
$is_error
;
return
$this
;
}
public
function
getIsError
()
{
return
$this
->
isError
;
}
public
function
setIsContinue
(
$is_continue
)
{
$this
->
isContinue
=
$is_continue
;
return
$this
;
}
public
function
getIsContinue
()
{
return
$this
->
isContinue
;
}
public
function
setErrorMessage
(
$error_message
)
{
$this
->
errorMessage
=
$error_message
;
return
$this
;
}
public
function
getErrorMessage
()
{
return
$this
->
errorMessage
;
}
public
function
setValue
(
$value
)
{
$this
->
value
=
$value
;
return
$this
;
}
public
function
getValue
()
{
return
$this
->
value
;
}
public
function
setIssuedChallenges
(
array
$issued_challenges
)
{
assert_instances_of
(
$issued_challenges
,
'PhabricatorAuthChallenge'
);
$this
->
issuedChallenges
=
$issued_challenges
;
return
$this
;
}
public
function
getIssuedChallenges
()
{
return
$this
->
issuedChallenges
;
}
}
Event Timeline
Log In to Comment