Commit 2ca207a6 authored by Yadd's avatar Yadd
Browse files

SAML in progress (#595)

parent fc1b5a2f
......@@ -975,9 +975,10 @@ sub extractFormInfo {
# Create SSO request
my $login = $self->createAuthnRequest(
$self->lassoServer, $idp, $method,
$forceAuthn, $isPassive, $nameIDFormat,
$allowProxiedAuthn, $signSSOMessage, $requestedAuthnContext
$req, $self->lassoServer, $idp,
$method, $forceAuthn, $isPassive,
$nameIDFormat, $allowProxiedAuthn, $signSSOMessage,
$requestedAuthnContext
);
unless ($login) {
......@@ -1043,7 +1044,7 @@ sub extractFormInfo {
my $sso_url = $login->msg_url;
my $sso_body = $login->msg_body;
$self->postUrl($sso_url);
$req->postUrl($sso_url);
if ( $method == $self->getHttpMethod("artifact-post") ) {
$req->{postFields} = { 'SAMLart' => $sso_body };
......@@ -1252,7 +1253,8 @@ sub authLogout {
no strict 'subs';
unless ( defined $method ) {
my $protocolType = Lasso::Constants::MD_PROTOCOL_TYPE_SINGLE_LOGOUT;
$method = $self->getFirstHttpMethod( $self->lassoServer, $idp, $protocolType );
$method =
$self->getFirstHttpMethod( $self->lassoServer, $idp, $protocolType );
}
# Skip SLO if no method found
......@@ -1338,7 +1340,7 @@ sub authLogout {
}
# Create Logout object
$logout = $self->createLogout($self->lassoServer);
$logout = $self->createLogout( $self->lassoServer );
# Process logout response
my $result = $self->processLogoutResponseMsg( $logout, $response );
......
......@@ -51,7 +51,8 @@ has customParameters => ( is => 'rw' );
has mustRedirect => ( is => 'rw' );
# Store URL for redirections
has urldc => ( is => 'rw' );
has urldc => ( is => 'rw' );
has postUrl => ( is => 'rw' );
# "check logins "flag"
has checkLogins => ( is => 'rw' );
......@@ -108,8 +109,8 @@ sub error_type {
sub init {
my ($self) = @_;
$self->{$_} = {} foreach(qw(datas customParameters sessionInfo));;
$self->{$_} = [] foreach(qw(respCookies));;
$self->{$_} = {} foreach (qw(datas customParameters sessionInfo));
$self->{$_} = [] foreach (qw(respCookies));
}
sub errorString {
......
......@@ -322,7 +322,6 @@ eJwyoqA9RGYguG5nh9zndi3LWAh7Z0lx+tIz+w==
"
},
},
samlStorageOptions => {},
}
}
);
......@@ -580,7 +579,6 @@ XVhuG8OrWQDoS5gYHSjdw1CTJyixeJwyoqA9RGYguG5nh9zndi3LWAh7Z0lx+tIz
-----END PUBLIC KEY-----
",
samlSPSSODescriptorAuthnRequestsSigned => 1,
samlStorageOptions => {},
},
}
);
......
......@@ -54,6 +54,12 @@
"notifications": 0,
"passwordDB": "Null",
"portal": "http://auth.example.com/",
"samlStorage": "Apache::Session::File",
"samlStorageOptions": {
"Directory": "t/sessions",
"LockDirectory": "t/sessions/lock",
"generateModule": "Lemonldap::NG::Common::Apache::Session::Generate::SHA256"
},
"reloadUrls": {},
"userDB": "Demo",
"whatToTrace": "_whatToTrace"
......
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