Commit b30d3db3 authored by Yadd's avatar Yadd

Tidy

parent 0c4fc4b8
......@@ -61,16 +61,15 @@ sub delU2FKey {
my $id = $req->params('sessionId')
or return $self->sendError( $req, 'sessionId is missing', 400 );
# Try to read session
my $session = $self->getApacheSession( $mod, $id )
or return $self->sendError( $req, undef, 400 );
# Delete U2F key attributs and update session
$session->data->{_u2fKeyHandle} = '';
$session->data->{_u2fUserKey} = '';
$session->update( \%{$session->data} );
$session->data->{_u2fKeyHandle} = '';
$session->data->{_u2fUserKey} = '';
$session->update( \%{ $session->data } );
Lemonldap::NG::Handler::PSGI::Main->localUnlog( $req, $id );
if ( $session->error ) {
return $self->sendError( $req, $session->error, 200 );
......
......@@ -27,26 +27,27 @@ use constant defaultRoute => 'u2f.html#/persistent';
sub addRoutes {
my ( $self, $conf ) = @_;
# Remote Procedure Call are defined in Lemonldap::NG::Common::Session::REST
# Remote Procedure Call are defined in Lemonldap::NG::Common::Session::REST
# HTML template
$self->addRoute( 'u2f.html', undef, ['GET'] )
# READ
->addRoute( u2f => { ':sessionType' => 'sessions' },
['GET'] )
# DELETE U2F KEY ATTRIBUTS
->addRoute(
u2f => { ':sessionType' => 'sessions' },
['GET']
)
# DELETE U2F KEY ATTRIBUTS
->addRoute(
u2f => { ':sessionType' => { ':sessionId' => 'delU2FKey' } },
['DELETE']
);
# UPDATE U2F KEY ATTRIBUTS
# UPDATE U2F KEY ATTRIBUTS
# ->addRoute(
# u2f => { ':sessionType' => { ':sessionId' => { ':updateSession' } },
# ['PUT']
#);
# u2f => { ':sessionType' => { ':sessionId' => { ':updateSession' } },
# ['PUT']
#);
$self->setTypes($conf);
......
......@@ -150,7 +150,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
#$scope.currentScope.remove()
$scope.waiting = false
$scope.showT = true
# Open node
$scope.stoggle = (scope) ->
node = scope.$modelValue
......
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