Skip to content

Commit 6f2f3d1

Browse files
authored
Merge pull request #106 from waterkip/GH-docs-for_release
Documentation updates
2 parents 9226e04 + e1774b6 commit 6f2f3d1

File tree

5 files changed

+58
-30
lines changed

5 files changed

+58
-30
lines changed

lib/Net/SAML2/Binding/Redirect.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,19 @@ Arguments:
5555
The SP's (Service Provider) also known as your application's signing key
5656
that your application uses to sign the AuthnRequest. Some IdPs may not
5757
verify the signature.
58+
Required with B<param> being C<SAMLRequest>.
5859
5960
=item B<cert>
6061
6162
IdP's (Identity Provider's) certificate that is used to verify a signed
6263
Redirect from the IdP. It is used to verify the signature of the Redirect
6364
response.
65+
Required with B<param> being C<SAMLResponse>.
6466
6567
=item B<url>
6668
6769
IdP's SSO (Single Sign Out) service url for the Redirect binding
70+
Required with B<param> being C<SAMLRequest>.
6871
6972
=item B<param>
7073
@@ -150,10 +153,9 @@ sub BUILD {
150153
croak("Need to have an URL specified") unless $self->has_url;
151154
croak("Need to have a key specified") unless $self->has_key;
152155
}
153-
if ($self->param eq 'SAMLResponse') {
156+
elsif ($self->param eq 'SAMLResponse') {
154157
croak("Need to have a cert specified") unless $self->has_cert;
155158
}
156-
# other params don't need to have these per-se
157159
}
158160

159161
# BUILDARGS

lib/Net/SAML2/Binding/SOAP.pm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ with 'Net::SAML2::Role::VerifyXML';
1111

1212
# ABSTRACT: Net::SAML2::Binding::SOAP - SOAP binding for SAML
1313

14-
=head1 NAME
15-
16-
Net::SAML2::Binding::SOAP - SOAP binding for SAML2
17-
1814
=head1 SYNOPSIS
1915
2016
my $soap = Net::SAML2::Binding::SOAP->new(

lib/Net/SAML2/Protocol/ArtifactResolve.pm

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,26 @@ Net::SAML2::Protocol::ArtifactResolve - ArtifactResolve protocol class.
1515
1616
=head1 SYNOPSIS
1717
18-
my $resolver = Net::SAML2::Binding::ArtifactResolve->new(
19-
issuer => 'http://localhost:3000',
20-
);
18+
my $resolver = Net::SAML2::Protocol::ArtifactResolve->new(
19+
artifact => 'yourartifact',
20+
destination => $idp->art_url('urn:oasis:names:tc:SAML:2.0:bindings:SOAP'), # https://idp.example.net/idp
21+
issuer => $sp->id, # https://you.example.com/auth/saml
22+
);
2123
22-
my $response = $resolver->resolve(params->{SAMLart});
24+
my $binding = Net::SAML2::Binding::SOAP->new(...);
25+
$binding->request($resolved->as_xml);
2326
2427
=head1 METHODS
2528
2629
=cut
2730

28-
=head2 new( ... )
31+
=head2 new(%args)
32+
33+
my $resolver = Net::SAML2::Protocol::ArtifactResolve->new(
34+
artifact => 'yourartifact',
35+
destination => $idp->art_url('urn:oasis:names:tc:SAML:2.0:bindings:SOAP'), # https://idp.example.net/idp
36+
issuer => $sp->id, # https://you.example.com/auth/saml
37+
);
2938
3039
Constructor. Returns an instance of the ArtifactResolve request for
3140
the given issuer and artifact.
@@ -36,16 +45,20 @@ Arguments:
3645
3746
=item B<issuer>
3847
39-
issuing SP's identity URI
48+
Issuing SP's identity URI
4049
4150
=item B<artifact>
4251
43-
artifact to be resolved
52+
Artifact to be resolved
4453
4554
=item B<destination>
4655
4756
IdP's identity URI
4857
58+
=item B<provider>
59+
60+
IdP's provider name
61+
4962
=back
5063
5164
=cut
@@ -60,14 +73,14 @@ has 'provider' => (
6073
predicate => 'has_provider',
6174
);
6275

63-
=head2 as_xml( )
76+
=head2 as_xml()
6477
6578
Returns the ArtifactResolve request as XML.
6679
6780
=cut
6881

6982
sub as_xml {
70-
my ($self) = @_;
83+
my $self = shift;
7184

7285
my $x = XML::Generator->new(':pretty');
7386
my $saml = ['saml' => URN_ASSERTION ];

lib/Net/SAML2/Protocol/LogoutRequest.pm

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ with 'Net::SAML2::Role::ProtocolMessage';
1111

1212
# ABSTRACT: SAML2 LogoutRequest Protocol object
1313

14-
=head1 NAME
15-
16-
Net::SAML2::Protocol::LogoutRequest - the SAML2 LogoutRequest object
17-
1814
=head1 SYNOPSIS
1915
2016
my $logout_req = Net::SAML2::Protocol::LogoutRequest->new(
@@ -36,24 +32,41 @@ Arguments:
3632
3733
=item B<session>
3834
39-
session to log out
35+
Session to log out
4036
4137
=item B<nameid>
4238
4339
NameID of the user to log out
4440
41+
=item B<destination>
42+
43+
IdP's identity URI this is required for a signed message but likely should be
44+
sent regardless
45+
46+
=back
47+
48+
The following options alter the output of the NameID element
49+
50+
=over
51+
4552
=item B<nameid_format>
4653
47-
NameIDFormat to specify
54+
When supplied adds the Format attribute to the NameID
4855
49-
=item B<issuer>
56+
=item B<sp_provided_id>
5057
51-
SP's identity URI
58+
When supplied adds the SPProvidedID attribute to the NameID
5259
53-
=item B<destination>
60+
=item B<include_name_qualifier>
5461
55-
IdP's identity URI this is required for a signed message but likely should be
56-
sent regardless
62+
Tell the module to include the NameQualifier and SPNameQualifier attributes in
63+
the NameID. Defaults to false unless the B<nameid_format> equals
64+
C<urn:oasis:names:tc:SAML:2.0:nameidformat:persistent>
65+
66+
=item B<affiliation_group_id>
67+
68+
When supplied sets the SPNameQualifier attribute. When not supplied, this
69+
defaults to the issuer.
5770
5871
=back
5972

lib/Net/SAML2/SP.pm

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,27 @@ Arguments:
4646
4747
=item B<url>
4848
49-
base for all SP service URLs
49+
Base for all SP service URLs
50+
51+
=item B<error_url>
52+
53+
The error URI. Can be relative to the base URI or a regular URI
5054
5155
=item B<id>
5256
5357
SP's identity URI.
5458
5559
=item B<cert>
5660
57-
path to the signing certificate
61+
Path to the signing certificate
5862
5963
=item B<key>
6064
61-
path to the private key for the signing certificate
65+
Path to the private key for the signing certificate
6266
6367
=item B<cacert>
6468
65-
path to the CA certificate for verification
69+
Path to the CA certificate for verification
6670
6771
=item B<org_name>
6872

0 commit comments

Comments
 (0)