Commit cb539738 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Use OTT rule (#1694)

parent 5a8a7d48
......@@ -12,7 +12,7 @@ use Lemonldap::NG::Portal::Main::Constants qw(
PE_OK
);
our $VERSION = '2.0.2';
our $VERSION = '2.0.3';
extends 'Lemonldap::NG::Portal::Auth::_WebForm';
......@@ -25,11 +25,9 @@ has tmp => (
);
sub init {
my ($self) = @_;
my $self = shift;
$self->db( $self->conf->{gpgDb} );
unless ( $_[0]->{conf}->{requireToken} ) {
$self->error("requireToken isn't set, unable to use GPG");
}
unless ( $self->db ) {
$self->error("gpgDb not set");
return 0;
......@@ -45,6 +43,10 @@ sub init {
sub extractFormInfo {
my ( $self, $req ) = @_;
unless ( $self->ottRule->( $req, {} ) ) {
$self->error("OTT isn't set, unable to use GPG");
}
# Keep token data for later use
my ( $token, $gpgToken );
if ( $token = $req->param('token') ) {
......
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