NAME
LibreCat::Auth::SSO::CAS - implementation of LibreCat::Auth::SSO for CAS
SYNOPSIS
#in your app.psgi
builder {
mount
"/auth/cas"
=> LibreCat::Auth::SSO::CAS->new(
session_key
=>
"auth_sso"
,
authorization_path
=>
"/auth/cas/callback"
)->to_app;
mount
"/auth/cas/callback"
=>
sub
{
my
$env
=
shift
;
my
$session
= Plack::Session->new(
$env
);
my
$auth_sso
=
$session
->get(
"auth_sso"
);
#not authenticated yet
unless
(
$auth_sso
){
return
[403,[
"Content-Type"
=>
"text/html"
],[
"forbidden"
]];
}
#process auth_sso (white list, roles ..)
[200,[
"Content-Type"
=>
"text/html"
],[
"logged in!"
]];
};
};
DESCRIPTION
This is an implementation of LibreCat::Auth::SSO to authenticate against a CAS server.
It inherits all configuration options from its parent.
CONFIG
TODO
* add an option to ignore validation of the SSL certificate of the CAS Service? For now you should set the environment like this:
export SSL_VERIFY_NONE=1
export PERL_LWP_SSL_VERIFY_HOSTNAME=0
AUTHOR
Nicolas Franck, <nicolas.franck at ugent.be>