Commit a69d19c2 authored by Christophe Maudoux's avatar Christophe Maudoux

Cleaning useless code

parent 65d3e921
...@@ -16,7 +16,7 @@ use feature 'state'; ...@@ -16,7 +16,7 @@ use feature 'state';
extends 'Lemonldap::NG::Common::Conf::AccessLib', extends 'Lemonldap::NG::Common::Conf::AccessLib',
'Lemonldap::NG::Common::Session::REST'; 'Lemonldap::NG::Common::Session::REST';
our $VERSION = '2.0.0'; our $VERSION = '2.0.2';
############################# #############################
# I. INITIALIZATION METHODS # # I. INITIALIZATION METHODS #
...@@ -42,26 +42,10 @@ sub addRoutes { ...@@ -42,26 +42,10 @@ sub addRoutes {
['DELETE'] ['DELETE']
); );
## ADD 2FA DEVICE
#->addRoute(
#sfa => { ':sessionType' => { ':sessionId' => 'add2FA' } },
#['PUT']
#)
## VERIFY 2FA DEVICE
#->addRoute(
#sfa => { ':sessionType' => { ':sessionId' => 'verify2FA' } },
#['POST']
#);
$self->setTypes($conf); $self->setTypes($conf);
#$self->{ipField} ||= 'ipAddr';
$self->{multiValuesSeparator} ||= '; '; $self->{multiValuesSeparator} ||= '; ';
$self->{hiddenAttributes} //= "_password"; $self->{hiddenAttributes} //= "_password";
$self->{TOTPCheck} = '1'; $self->{TOTPCheck} = $self->{U2FCheck} = $self->{UBKCheck} = '1';
$self->{U2FCheck} = '1';
$self->{UBKCheck} = '1';
} }
################### ###################
...@@ -91,26 +75,6 @@ sub del2F { ...@@ -91,26 +75,6 @@ sub del2F {
} }
} }
#sub add2FA {
#my ( $self, $req, $session, $skey ) = @_;
#eval 'use Crypt::U2F::Server::Simple';
#if ($@) {
#$self->error("Can't load U2F library: $@");
#return 0;
#}
#return $self->addU2FKey( $req, $session, $skey );
#}
#sub verify2FA {
#my ( $self, $req, $session, $skey ) = @_;
#return $self->addU2FKey( $req, $session, $skey );
#}
######################## ########################
# III. DISPLAY METHODS # # III. DISPLAY METHODS #
######################## ########################
...@@ -120,7 +84,6 @@ sub sfa { ...@@ -120,7 +84,6 @@ sub sfa {
# Case 1: only one session is required # Case 1: only one session is required
if ($session) { if ($session) {
return $self->session( $req, $session, $skey ); return $self->session( $req, $session, $skey );
} }
......
...@@ -298,9 +298,6 @@ sub run { ...@@ -298,9 +298,6 @@ sub run {
[ 'Content-Type' => 'application/json', 'Content-Length' => 12, ], [ 'Content-Type' => 'application/json', 'Content-Length' => 12, ],
['{"result":1}'] ['{"result":1}']
]; ];
my $err = Crypt::U2F::Server::Simple::lastError();
$self->userLogger->warn("U2F Unregistration failed: $err");
return $self->p->sendError( $req, $err, 200 );
} }
else { else {
$self->logger->error("Unknown U2F action -> $action"); $self->logger->error("Unknown U2F action -> $action");
...@@ -316,7 +313,6 @@ sub loadUser { ...@@ -316,7 +313,6 @@ sub loadUser {
# Read existing 2FDevices # Read existing 2FDevices
$self->logger->debug("Looking for 2F Devices ..."); $self->logger->debug("Looking for 2F Devices ...");
my ( $kh, $uk, $_2fDevices ); my ( $kh, $uk, $_2fDevices );
my @u2fs = (); my @u2fs = ();
if ( $req->userData->{_2fDevices} ) { if ( $req->userData->{_2fDevices} ) {
......
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