Support #11082 » code-to-reproduce-11082.pl
1 |
use 5.14.2; |
---|---|
2 |
use Lasso; |
3 |
|
4 |
my $server = Lasso::Server->new("sp-metadata.xml", # Liberty metadata file for the service provider |
5 |
"sp-private.pem", # service provider private key; used to sign documents |
6 |
undef, # |
7 |
"sp-cert.pem"); # service provider certificate; sent inside signed documents |
8 |
|
9 |
|
10 |
$server->add_provider(Lasso::Constants::PROVIDER_ROLE_IDP, |
11 |
"idp-metadata.xml", # Liberty metadata file for the identity provider |
12 |
"idp-public.pem", # identity provider public key; used to verify signature in documents sent by the identity provider |
13 |
"idp-cacert.pem"); # certificate of the certification authority used by the identity provider |
14 |
|
15 |
|
16 |
my $login = Lasso::Login->new($server); |
17 |
|
18 |
$login->init_authn_request('http://www.idp.com/123', Lasso::Constants::HTTP_METHOD_REDIRECT ); |
19 |
$login->build_authn_request_msg(); |