Skip to content
Snippets Groups Projects
Verified Commit ae59aeab authored by Pavel Břoušek's avatar Pavel Břoušek
Browse files

fix: throw NoPassive when trying to do 2FA in passive request

introduced in fe5daa27 but reverted without explanation in 9e320cfb
parent 880e351f
No related branches found
No related tags found
1 merge request!3fix: throw NoPassive when trying to do 2FA in passive request
......@@ -11,6 +11,7 @@ use SimpleSAML\Error\ConfigurationError;
use SimpleSAML\Logger;
use SimpleSAML\Module;
use SimpleSAML\Module\privacyidea\Auth\Utils;
use SimpleSAML\Module\saml\Error\NoPassive;
use SimpleSAML\Utils\HTTP;
/**
......@@ -96,6 +97,10 @@ class PrivacyideaAuthProc extends ProcessingFilter
$username = $state['Attributes'][$this->authProcConfig['uidKey']][0];
$stateId = State::saveState($state, 'privacyidea:privacyidea');
if (isset($state['isPassive']) && true === $state['isPassive']) {
throw new NoPassive('Passive multi-factor authentication not supported.');
}
// Check if it should be controlled that user has no tokens and a new token should be enrolled.
if (!empty($this->authProcConfig['doEnrollToken']) && true === $this->authProcConfig['doEnrollToken']) {
$stateId = $this->enrollToken($stateId, $username);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment