Add skipRenewConfirmation parameter (#1422)

This commit is contained in:
Xavier Guimard 2018-05-16 10:45:41 +02:00
parent 25470344ef
commit a994024cf7
3 changed files with 20 additions and 9 deletions

View File

@ -3083,6 +3083,9 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'default' => 0,
'type' => 'bool'
},
'skipRenewConfirmation' => {
'type' => 'bool'
},
'slaveAuthnLevel' => {
'default' => 2,
'type' => 'int'

View File

@ -369,13 +369,18 @@ sub attributes {
documentation => 'Enable StayConnected plugin',
},
checkState => {
type => 'bool',
type => 'bool',
documentation => 'Enable CheckState plugin',
},
checkStateSecret => {
type => 'text',
type => 'text',
documentation => 'Secret token for CheckState plugin',
},
skipRenewConfirmation => {
type => 'bool',
documentation =>
'Avoid asking confirmation when an Issuer asks to renew auth',
},
# Loggers (ini only)
logLevel => {

View File

@ -157,14 +157,17 @@ sub restoreRequest {
sub reAuth {
my ( $self, $req ) = @_;
$req->datas->{_url} = encode_base64(
my $url =
$self->conf->{portal}
. $req->path_info
. '?issuerRequest'
. $self->path . '='
. $self->storeRequest($req),
''
);
. $req->path_info
. '?issuerRequest'
. $self->path . '='
. $self->storeRequest($req);
if ( $self->conf->{skipRenewConfirmation} ) {
$req->response( [ 302, [ Location => $url ], [] ] );
return PE_SENDRESPONSE;
}
$req->datas->{_url} = encode_base64( $url, '' );
return PE_RENEWSESSION;
}