Commit 5e4ef360 authored by Xavier Guimard's avatar Xavier Guimard

Use globalStorage unless oidcStorage is defined (may fix #1251)

parent f1104cc0
......@@ -642,15 +642,24 @@ sub decodeJSON {
# @return Lemonldap::NG::Common::Session object
sub getOpenIDConnectSession {
my ( $self, $id, $info ) = @_;
my %storage = (
storageModule => $self->conf->{oidcStorage},
storageModuleOptions => $self->conf->{oidcStorageOptions},
);
unless ( $storage{storageModule} ) {
%storage = (
storageModule => $self->conf->{globalStorage},
storageModuleOptions => $self->conf->{globalStorageOptions},
);
}
my $oidcSession = Lemonldap::NG::Common::Session->new(
{
storageModule => $self->conf->{oidcStorage},
storageModuleOptions => $self->conf->{oidcStorageOptions},
cacheModule => $self->conf->{localSessionStorage},
cacheModuleOptions => $self->conf->{localSessionStorageOptions},
id => $id,
kind => "OpenIDConnect",
%storage,
cacheModule => $self->conf->{localSessionStorage},
cacheModuleOptions => $self->conf->{localSessionStorageOptions},
id => $id,
kind => "OpenIDConnect",
( $info ? ( info => $info ) : () ),
}
);
......
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