| 1 | package Net::SAML2::Protocol::ArtifactResolve; | ||||||||||
| 2 | 32 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 32 | our $VERSION = '0.89'; # VERSION | |||||||||
| 4 | |||||||||||
| 5 | 32 | ▶ | use MooseX::Types::URI qw/ Uri /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 32 | ▶ | use URN::OASIS::SAML2 qw(:urn); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 32 | with 'Net::SAML2::Role::ProtocolMessage'; | |||||||||
| 9 | |||||||||||
| 10 | # ABSTRACT: ArtifactResolve protocol class | ||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | |||||||||||
| 14 | 32 | has 'issuer' => (isa => 'Str', is => 'ro', required => 1); | |||||||||
| 15 | 32 | has 'destination' => (isa => 'Str', is => 'ro', required => 1); | |||||||||
| 16 | 32 | has 'artifact' => (isa => 'Str', is => 'ro', required => 1); | |||||||||
| 17 | 32 | has 'provider' => ( | |||||||||
| 18 | isa => 'Str', | ||||||||||
| 19 | is => 'ro', | ||||||||||
| 20 | required => 0, | ||||||||||
| 21 | predicate => 'has_provider', | ||||||||||
| 22 | ); | ||||||||||
| 23 | |||||||||||
| 24 | |||||||||||
| 25 | 2 | ▶ | sub as_xml { | ||||||||
|
Subroutine
as_xml: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 26 | 2 | my $self = shift; | |||||||||
| 27 | |||||||||||
| 28 | 2 | my $x = XML::Generator->new(':pretty'); | |||||||||
| 29 | 2 | my $saml = ['saml' => URN_ASSERTION ]; | |||||||||
| 30 | 2 | my $samlp = ['samlp' => URN_PROTOCOL ]; | |||||||||
| 31 | |||||||||||
| 32 | 2 | ▶ | $x->xml( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | $x->ArtifactResolve( | ||||||||||
| 34 | $samlp, | ||||||||||
| 35 | { ID => $self->id, | ||||||||||
| 36 | IssueInstant => $self->issue_instant, | ||||||||||
| 37 | Destination => $self->destination, | ||||||||||
| 38 | $self->has_provider ? ( | ||||||||||
| 39 | ProviderName => $self->provider, | ||||||||||
| 40 | ) : (), | ||||||||||
| 41 | Version => '2.0' }, | ||||||||||
| 42 | $x->Issuer( | ||||||||||
| 43 | $saml, | ||||||||||
| 44 | $self->issuer, | ||||||||||
| 45 | ), | ||||||||||
| 46 | $x->Artifact( | ||||||||||
| 47 | $samlp, | ||||||||||
| 48 | $self->artifact, | ||||||||||
| 49 | ), | ||||||||||
| 50 | ) | ||||||||||
| 51 | ); | ||||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | 32 | __PACKAGE__->meta->make_immutable; | |||||||||
| 55 | |||||||||||
| 56 | __END__ | ||||||||||