make tidy
This commit is contained in:
parent
b48232068e
commit
7db3b688fa
@ -222,7 +222,7 @@ BEGIN {
|
|||||||
my ( $class, $args, $data ) = @_;
|
my ( $class, $args, $data ) = @_;
|
||||||
die "Only Redis is supported" unless ( $args->{Driver} eq 'Redis' );
|
die "Only Redis is supported" unless ( $args->{Driver} eq 'Redis' );
|
||||||
my $redis = Redis->new(%$args);
|
my $redis = Redis->new(%$args);
|
||||||
my @keys = $redis->keys('*');
|
my @keys = $redis->keys('*');
|
||||||
my %res;
|
my %res;
|
||||||
foreach my $k (@keys) {
|
foreach my $k (@keys) {
|
||||||
my $v =
|
my $v =
|
||||||
|
@ -88,7 +88,7 @@ sub new {
|
|||||||
# If nothing is found, redirects the user to the Lemonldap::NG portal.
|
# If nothing is found, redirects the user to the Lemonldap::NG portal.
|
||||||
# @return boolean : true if authentication is good. Exit before else
|
# @return boolean : true if authentication is good. Exit before else
|
||||||
sub authenticate {
|
sub authenticate {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->abort(
|
$self->abort(
|
||||||
"Can't authenticate because configuration has not been loaded",
|
"Can't authenticate because configuration has not been loaded",
|
||||||
$self->{noConf} )
|
$self->{noConf} )
|
||||||
@ -136,11 +136,10 @@ sub authorize {
|
|||||||
# 0 if user isn't granted
|
# 0 if user isn't granted
|
||||||
sub testUri {
|
sub testUri {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->abort(
|
$self->abort( "Can't test URI because configuration has not been loaded",
|
||||||
"Can't test URI because configuration has not been loaded",
|
|
||||||
$self->{noConf} )
|
$self->{noConf} )
|
||||||
if ( $self->{noConf} );
|
if ( $self->{noConf} );
|
||||||
my $uri = shift;
|
my $uri = shift;
|
||||||
my $host =
|
my $host =
|
||||||
( $uri =~ s#^(?:https?://)?([^/]*)/#/# ) ? $1 : $ENV{SERVER_NAME};
|
( $uri =~ s#^(?:https?://)?([^/]*)/#/# ) ? $1 : $ENV{SERVER_NAME};
|
||||||
return -1 unless ( Lemonldap::NG::Handler::_CGI->vhostAvailable($host) );
|
return -1 unless ( Lemonldap::NG::Handler::_CGI->vhostAvailable($host) );
|
||||||
|
@ -72,7 +72,7 @@ BEGIN {
|
|||||||
lmSetHeaderOut lmSetErrHeaderOut $cookieName $https $port
|
lmSetHeaderOut lmSetErrHeaderOut $cookieName $https $port
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
traces => [qw( $whatToTrace $statusPipe $statusOut)],
|
traces => [qw( $whatToTrace $statusPipe $statusOut)],
|
||||||
apache => [
|
apache => [
|
||||||
qw( MP OK REDIRECT FORBIDDEN DONE DECLINED SERVER_ERROR useRedirectOnForbidden )
|
qw( MP OK REDIRECT FORBIDDEN DONE DECLINED SERVER_ERROR useRedirectOnForbidden )
|
||||||
],
|
],
|
||||||
@ -442,7 +442,8 @@ sub childInit {
|
|||||||
$s->push_handlers(
|
$s->push_handlers(
|
||||||
PerlPostConfigHandler => sub {
|
PerlPostConfigHandler => sub {
|
||||||
my ( $c, $l, $t, $s ) = splice @_;
|
my ( $c, $l, $t, $s ) = splice @_;
|
||||||
$s->add_version_component('Lemonldap::NG::Handler/'.$VERSION);
|
$s->add_version_component(
|
||||||
|
'Lemonldap::NG::Handler/' . $VERSION );
|
||||||
}
|
}
|
||||||
) unless ( $args->{hideSignature} );
|
) unless ( $args->{hideSignature} );
|
||||||
}
|
}
|
||||||
@ -865,7 +866,7 @@ sub forbidden {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$class->lmLog( "Return forbidden access", 'debug' );
|
$class->lmLog( "Return forbidden access", 'debug' );
|
||||||
return FORBIDDEN;
|
return FORBIDDEN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1340,9 +1340,9 @@ sub testStruct {
|
|||||||
msgFail => 'Bad module name',
|
msgFail => 'Bad module name',
|
||||||
},
|
},
|
||||||
useRedirectOnForbidden => $boolean,
|
useRedirectOnForbidden => $boolean,
|
||||||
useXForwardedForIP => $boolean,
|
useXForwardedForIP => $boolean,
|
||||||
variables => $testNotDefined,
|
variables => $testNotDefined,
|
||||||
whatToTrace => {
|
whatToTrace => {
|
||||||
test => qr/^\$?_?[a-zA-Z]\w*$/,
|
test => qr/^\$?_?[a-zA-Z]\w*$/,
|
||||||
msgFail => 'Bad value',
|
msgFail => 'Bad value',
|
||||||
},
|
},
|
||||||
@ -1615,8 +1615,8 @@ sub defaultConf {
|
|||||||
userDB => 'LDAP',
|
userDB => 'LDAP',
|
||||||
passwordDB => 'LDAP',
|
passwordDB => 'LDAP',
|
||||||
useRedirectOnForbidden => '0',
|
useRedirectOnForbidden => '0',
|
||||||
useXForwardedForIP => '0',
|
useXForwardedForIP => '0',
|
||||||
whatToTrace => '$_whatToTrace',
|
whatToTrace => '$_whatToTrace',
|
||||||
########
|
########
|
||||||
# SAML #
|
# SAML #
|
||||||
########
|
########
|
||||||
|
@ -393,8 +393,8 @@ sub en {
|
|||||||
samlAuthnContextMapPassword => 'Password',
|
samlAuthnContextMapPassword => 'Password',
|
||||||
samlAuthnContextMapPasswordProtectedTransport =>
|
samlAuthnContextMapPasswordProtectedTransport =>
|
||||||
'Password protected transport',
|
'Password protected transport',
|
||||||
samlAuthnContextMapTLSClient => 'TLS client',
|
samlAuthnContextMapTLSClient => 'TLS client',
|
||||||
samlAuthnContextMapKerberos => 'Kerberos',
|
samlAuthnContextMapKerberos => 'Kerberos',
|
||||||
samlCommonDomainCookie => 'Common Domain Cookie',
|
samlCommonDomainCookie => 'Common Domain Cookie',
|
||||||
samlCommonDomainCookieActivation => 'Activation',
|
samlCommonDomainCookieActivation => 'Activation',
|
||||||
samlCommonDomainCookieDomain => 'Common domain',
|
samlCommonDomainCookieDomain => 'Common domain',
|
||||||
@ -762,8 +762,8 @@ sub fr {
|
|||||||
samlAuthnContextMapPassword => 'Mot de passe',
|
samlAuthnContextMapPassword => 'Mot de passe',
|
||||||
samlAuthnContextMapPasswordProtectedTransport =>
|
samlAuthnContextMapPasswordProtectedTransport =>
|
||||||
'Mot de passe protégé',
|
'Mot de passe protégé',
|
||||||
samlAuthnContextMapTLSClient => 'Client TLS',
|
samlAuthnContextMapTLSClient => 'Client TLS',
|
||||||
samlAuthnContextMapKerberos => 'Kerberos',
|
samlAuthnContextMapKerberos => 'Kerberos',
|
||||||
samlCommonDomainCookie => 'Cookie de Domaine Commun',
|
samlCommonDomainCookie => 'Cookie de Domaine Commun',
|
||||||
samlCommonDomainCookieActivation => 'Activation',
|
samlCommonDomainCookieActivation => 'Activation',
|
||||||
samlCommonDomainCookieDomain => 'Domaine commun',
|
samlCommonDomainCookieDomain => 'Domaine commun',
|
||||||
|
@ -14,15 +14,15 @@ use Data::Dumper;
|
|||||||
my $session_id = shift @ARGV;
|
my $session_id = shift @ARGV;
|
||||||
|
|
||||||
# Service
|
# Service
|
||||||
my $soap = SOAP::Lite->new( proxy => 'http://auth.example.com/index.pl/sessions');
|
my $soap =
|
||||||
|
SOAP::Lite->new( proxy => 'http://auth.example.com/index.pl/sessions' );
|
||||||
$soap->default_ns('urn:Lemonldap/NG/Common/CGI/SOAPService');
|
$soap->default_ns('urn:Lemonldap/NG/Common/CGI/SOAPService');
|
||||||
|
|
||||||
|
|
||||||
# Call some SOAP methods
|
# Call some SOAP methods
|
||||||
my $attributes = $soap->call( 'getAttributes', $session_id)->result();
|
my $attributes = $soap->call( 'getAttributes', $session_id )->result();
|
||||||
print Dumper $attributes;
|
print Dumper $attributes;
|
||||||
|
|
||||||
my $applications = $soap->call( 'getMenuApplications', $session_id)->result();
|
my $applications = $soap->call( 'getMenuApplications', $session_id )->result();
|
||||||
print Dumper $applications;
|
print Dumper $applications;
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user