This commit is contained in:
Christophe Maudoux 2022-05-19 23:20:32 +02:00
parent c31fb38d7b
commit 82c10e3ecd
2 changed files with 12 additions and 9 deletions

View File

@ -5,16 +5,19 @@ use Mouse;
use URI::Escape; use URI::Escape;
use Lemonldap::NG::Common::FormEncode; use Lemonldap::NG::Common::FormEncode;
use Lemonldap::NG::Portal::Main::Constants qw( use Lemonldap::NG::Portal::Main::Constants qw(
PE_ERROR
PE_IDPCHOICE
PE_OK PE_OK
PE_ERROR
PE_REDIRECT PE_REDIRECT
PE_IDPCHOICE
PE_SENDRESPONSE PE_SENDRESPONSE
); );
our $VERSION = '2.0.12'; our $VERSION = '2.0.15';
extends 'Lemonldap::NG::Portal::Main::Auth', 'Lemonldap::NG::Portal::Lib::CAS'; extends qw(
Lemonldap::NG::Portal::Main::Auth
Lemonldap::NG::Portal::Lib::CAS
);
# PROPERTIES # PROPERTIES
@ -133,7 +136,7 @@ sub extractFormInfo {
else { else {
# Try to use server resolution ruls # Try to use server resolution rules
foreach ( keys %{ $self->srvRules } ) { foreach ( keys %{ $self->srvRules } ) {
my $cond = $self->srvRules->{$_} or next; my $cond = $self->srvRules->{$_} or next;
if ( $cond->( $req, $req->sessionInfo ) ) { if ( $cond->( $req, $req->sessionInfo ) ) {
@ -147,7 +150,7 @@ sub extractFormInfo {
unless ($srv) { unless ($srv) {
# Server list # Server list
$req->data->{list} = $self->srvList; $req->data->{list} = $self->srvList;
$req->data->{login} = 1; $req->data->{login} = 1;
return PE_IDPCHOICE; return PE_IDPCHOICE;
} }

View File

@ -6,11 +6,11 @@ use MIME::Base64 qw/encode_base64 decode_base64/;
use Lemonldap::NG::Common::JWT qw(getJWTPayload); use Lemonldap::NG::Common::JWT qw(getJWTPayload);
use Lemonldap::NG::Portal::Main::Constants qw( use Lemonldap::NG::Portal::Main::Constants qw(
PE_OK PE_OK
PE_OIDC_AUTH_ERROR
PE_IDPCHOICE PE_IDPCHOICE
PE_OIDC_AUTH_ERROR
); );
our $VERSION = '2.0.14'; our $VERSION = '2.0.15';
extends qw( extends qw(
Lemonldap::NG::Portal::Main::Auth Lemonldap::NG::Portal::Main::Auth
@ -249,7 +249,7 @@ sub extractFormInfo {
else { else {
# Try to use OP resolution ruls # Try to use OP resolution rules
foreach ( keys %{ $self->opRules } ) { foreach ( keys %{ $self->opRules } ) {
my $cond = $self->opRules->{$_} or next; my $cond = $self->opRules->{$_} or next;
if ( $cond->( $req, $req->sessionInfo ) ) { if ( $cond->( $req, $req->sessionInfo ) ) {