Commit b938f523 authored by Clément OUDOT's avatar Clément OUDOT

Put OIDC request parameters in %ENV (#1156)

parent e57abb72
......@@ -18,6 +18,10 @@ extends 'Lemonldap::NG::Portal::Main::Issuer',
'Lemonldap::NG::Portal::Lib::OpenIDConnect',
'Lemonldap::NG::Common::Conf::AccessLib';
# INTERFACE
sub beforeAuth { 'exportRequestParameters' }
# INITIALIZATION
# OIDC has 7 endpoints managed here as PSGI endpoints or in run() [Main/Issuer.pm
......@@ -1346,4 +1350,22 @@ sub metadata {
# op_tos_uri
}
# Store request parameters in %ENV
sub exportRequestParameters {
my ( $self, $req ) = @_;
foreach my $param (
qw/response_type scope client_id state redirect_uri nonce
response_mode display prompt max_age ui_locales id_token_hint
login_hint acr_values request request_uri/
)
{
if ( $req->param($param) ) {
$ENV{ "llng_oidc_" . $param } = $req->param($param);
}
}
return PE_OK;
}
1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment