lemonldap-ng/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/U2F.pm

44 lines
733 B
Perl
Raw Normal View History

2017-02-04 08:55:47 +01:00
# U2F second factor authentication
#
# This plugin handle authentications to ask U2F second factor for users that
# have registered their U2F key
2017-02-02 22:48:32 +01:00
package Lemonldap::NG::Portal::Plugins::U2F;
use strict;
use Mouse;
our $VERSION = '2.0.0';
2017-02-04 08:55:47 +01:00
extends 'Lemonldap::NG::Portal::Lib::U2F';
# INTERFACE
sub afterDatas { 'run' }
# INITIALIZATION
has ott => (
is => 'rw',
default => sub {
my $ott =
$_[0]->{p}->loadModule('Lemonldap::NG::Portal::Lib::OneTimeToken');
$ott->timeout( $_[0]->conf->{formTimeout} );
return $ott;
}
);
2017-02-02 22:48:32 +01:00
sub init {
2017-02-04 08:55:47 +01:00
my ($self) = @_;
return 0 unless $self->SUPER::init;
2017-02-02 22:48:32 +01:00
1;
}
2017-02-04 08:55:47 +01:00
# RUNNING METHODS
# Main method
sub run {
my($self,$req) = @_;
}
2017-02-02 22:48:32 +01:00
1;