Skip to content

Commit

Permalink
Merge branch 'wip-MSFTMPP-329-m27' into MOODLE_27_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmcq committed Feb 17, 2016
2 parents 93e6f91 + 4278bd0 commit c51c0eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/loginflow/authcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,18 @@ public function loginpage_idp_list($wantsurl) {
public function handleredirect() {
$state = optional_param('state', '', PARAM_RAW);
$promptlogin = (bool)optional_param('promptlogin', 0, PARAM_BOOL);
$promptaconsent = (bool)optional_param('promptaconsent', 0, PARAM_BOOL);
if (!empty($state)) {
// Response from OP.
$this->handleauthresponse($_REQUEST);
} else {
// Initial login request.
$this->initiateauthrequest($promptlogin, ['forceflow' => 'authcode']);
$stateparams = ['forceflow' => 'authcode'];
$extraparams = [];
if ($promptaconsent === true) {
$extraparams = ['prompt' => 'admin_consent'];
}
$this->initiateauthrequest($promptlogin, $stateparams, $extraparams);
}
}

Expand Down

0 comments on commit c51c0eb

Please sign in to comment.