diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm index 9e4632d21..276081e04 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm @@ -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' diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm index 3191be088..c1e521577 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm @@ -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 => { diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm index 45fdcd713..724db13b4 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Issuer.pm @@ -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; }