Lemonldap-NG-Portal
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Lemonldap/NG/Portal/Issuer/OpenIDConnect.pm view on Meta::CPAN
. " no longer exists, removing offline session" );
$session->remove;
}
else {
$self->logger->error( "Could not resolve user: " . $req->user );
}
return 0;
}
# Change the ID of secondary sessions (during upgrade)
sub updateOidcSecondarySessions {
my ( $self, $req, $old_session_id, $new_session_id ) = @_;
my $module = "Lemonldap::NG::Common::Apache::Session";
my %opts = $self->_storeOpts;
my $options = $opts{storageModuleOptions};
$options->{backend} = $opts{storageModule};
my $oidc_sessions =
$module->searchOn( $options, "user_session_id", $old_session_id );
lib/Lemonldap/NG/Portal/Lib/2fDevices.pm view on Meta::CPAN
=item key, value: update the device whose 'key' field equals value
=item update_key, update_value: set the matched devices' 'update_key' field to update_value
=back
Returns true if the update was sucessful
=cut
sub update2fDevice {
my ( $self, $req, $info, $type, $key, $value, $update_key, $update_value )
= @_;
my $user = $info->{ $self->conf->{whatToTrace} };
my $_2fDevices = $self->get2fDevices( $req, $info );
return 0 unless $_2fDevices;
my @found =
grep { $_->{type} eq $type and $_->{$key} eq $value } @{$_2fDevices};
lib/Lemonldap/NG/Portal/Lib/CAS.pm view on Meta::CPAN
return $self->sendSoapResponse(
$req, "<cas:serviceResponse xmlns:cas='http://www.yale.edu/tp/cas'>
\t<cas:proxySuccess>
\t\t<cas:proxyTicket>$ticket</cas:proxyTicket>
\t</cas:proxySuccess>
</cas:serviceResponse>\n"
);
}
# Change the ID of secondary sessions (during upgrade)
sub updateCasSecondarySessions {
my ( $self, $req, $old_session_id, $new_session_id ) = @_;
# Find CAS sessions
my $moduleOptions;
if ( $self->conf->{casStorage} ) {
$moduleOptions = $self->conf->{casStorageOptions} || {};
$moduleOptions->{backend} = $self->conf->{casStorage};
}
else {
$moduleOptions = $self->conf->{globalStorageOptions} || {};
lib/Lemonldap/NG/Portal/Lib/OneTimeToken.pm view on Meta::CPAN
unless ($tsession) {
$self->logger->notice("Bad (or expired) token $id");
return undef;
}
my %h = %{ $tsession->{data} };
$tsession->remove unless ($keep);
return \%h;
}
}
sub updateToken {
my ( $self, $id, $k, $v ) = @_;
if ( $self->cache ) {
my $data;
unless ( $data = $self->cache->get($id) ) {
$self->logger->notice("Bad (or expired) token $id");
return undef;
}
my $h = from_json( $data, { allow_nonref => 1 } );
$h->{$k} = $v;
$self->cache->set( $id, to_json($h), $self->timeout . ' s' );
lib/Lemonldap/NG/Portal/Lib/OpenIDConnect.pm view on Meta::CPAN
# Get existing Refresh Token
# @param id
# @return new Lemonldap::NG::Common::Session object
sub getRefreshToken {
my ( $self, $id ) = @_;
return $self->getOpenIDConnectSession( $id, "refresh_token", noCache => 1 );
}
sub updateRefreshToken {
my $self = shift;
return $self->updateToken(@_);
}
sub updateToken {
my ( $self, $id, $infos ) = @_;
my $oidcSession = Lemonldap::NG::Common::Session->new( {
$self->_storeOpts(),
cacheModule => $self->conf->{localSessionStorage},
cacheModuleOptions => $self->conf->{localSessionStorageOptions},
hashStore => $self->conf->{hashedSessionStore},
id => $id,
info => $infos,
}
lib/Lemonldap/NG/Portal/Lib/SAML.pm view on Meta::CPAN
eval {
Lasso::Provider::set_encryption_mode( $provider, $encryption_mode );
};
return $self->checkLassoError($@);
}
## @method boolean updateSAMLSecondarySessions(string old_session_id, string new_session_id)
# Update _saml_id of secondary sessions when the session ID is changed (upgrade)
sub updateSAMLSecondarySessions {
my ( $self, $req, $old_session_id, $new_session_id ) = @_;
# Find SAML sessions
my $saml_sessions =
Lemonldap::NG::Common::Apache::Session->searchOn( $self->amOpts,
"_saml_id", $old_session_id );
if (
my @saml_sessions_keys =
grep { $saml_sessions->{$_}->{_session_kind} eq $self->sessionKind }
lib/Lemonldap/NG/Portal/Main/Run.pm view on Meta::CPAN
return $ps;
}
# Update persistent session.
# Call updateSession() and store %$infos in a persistent session.
# Note that if the session does not exists, it will be created.
# @param infos hash reference of information to update
# @param uid optional Unhashed persistent session ID
# @param id optional SSO session ID
# @return nothing
sub updatePersistentSession {
my ( $self, $req, $infos, $uid, $id ) = @_;
# Return if no infos to update
return ()
unless ( ref $infos eq 'HASH'
and %$infos
and !$self->conf->{disablePersistentStorage} );
$uid ||= $req->{sessionInfo}->{ $self->conf->{whatToTrace} }
|| $req->userData->{ $self->conf->{whatToTrace} };
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.589 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )