Net::SA...Request(3)
okay so this is the Net::SA...Request(3) page from the User Contributed Perl Documentation, aka the Net::SAML2::Protocol::AuthnRequest page β it's giving major main character energy and it's literally all about the SAML2 AuthnRequest object π
.
π NAME π
Net::SAML2::Protocol::AuthnRequest β SAML2 AuthnRequest object. That's the whole vibe, bestie π¦.
β¨ VERSION β¨
version 0.85 β yes ma'am, that's the version πΈ.
π SYNOPSIS π
okay so here's the group-chat recap of how you use it. First flavor:
my $authnreq = Net::SAML2::Protocol::AuthnRequest->new(
id => 'NETSAML2_Crypt::OpenSSL::Random::random_pseudo_bytes(16),
issuer => $self->{id}, # Service Provider (SP) Entity ID
destination => $destination, # Identity Provider (IdP) SSO URL
provider_name => $provider_name, # Service Provider (SP) Human Readable Name
issue_instant => DateTime->now, # Defaults to Current Time
force_authn => $force_authn, # Force new authentication (Default: false)
is_passive => $is_passive, # IdP should not take control of UI (Default: false)
);
my $request_id = $authnreq->id; # Store and Compare to InResponseTo
or
my $request_id = 'NETSAML2_' . unpack 'H*', Crypt::OpenSSL::Random::random_pseudo_bytes(16);
my $authnreq = Net::SAML2::Protocol::AuthnRequest->as_xml(
id => $request_id, # Unique Request ID will be returned in response
issuer => $self->{id}, # Service Provider (SP) Entity ID
destination => $destination, # Identity Provider (IdP) SSO URL
provider_name => $provider_name, # Service Provider (SP) Human Readable Name
issue_instant => DateTime->now, # Defaults to Current Time
force_authn => $force_authn, # Force new authentication (Default: false)
is_passive => $is_passive, # IdP should not take control of UI (Default: false)
);
π METHODS π
π new( ... ) π
Constructor. Creates an instance of the AuthnRequest object. It's giving main character energy β¨.
Important Note: best practice is to always do this first. While it is possible to callas_xml()first, you do not have to set theidas it will be set for you automatically.
However, tracking theidis important for security to ensure that the response has the sameidin theInResponseToattribute. no cap, that's the security vibe check π₯.
Arguments:
nameidpolicy_formatβ the Format attribute forNameIDPolicyπ.AuthnContextClassRef,<AuthnContextDeclRefβ each one is an arrayref containing values forAuthnContextClassRefandAuthnContextDeclRef. If any is populated, theRequestedAuthnContextwill be included in the request π.RequestedAuthnContext_Comparisonβ the value for theComparisonattribute in caseRequestedAuthnContextis included (see above). Default value isexactβ.identity_providersβ an arrayref of Identity providers; if used, theScopingelement is added to the XML πΈ.
π¦ as_xml( ) π¦
Returns the AuthnRequest as XML. That's it, that's the whole method, and it ate π
.
π AUTHOR π
Timothy Legge <timlegge@gmail.com> β iconic, periodt π.
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Venda Ltd, see the CONTRIBUTORS file for others π«Ά.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself π.
okay bye bestie, this page was rendered with perl v5.42.2 on 2026-02-11, and it's the Net::SA...Request(3) page πβ¨π.
π¦ where this page comes from
- alpine 3.24: perl-net-saml2-doc 0.85-r0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms