Skip to content

Commit

Permalink
use source from the profile if it does not match
Browse files Browse the repository at this point in the history
  • Loading branch information
jrouzierinverse committed Dec 18, 2024
1 parent d99f1eb commit f7db876
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ use pf::constants::realm;

has 'landing_template' => ('is' => 'rw', default => sub {'saml.html'});

has '+source' => (isa => 'pf::Authentication::Source::SAMLSource');
has '+source' => (
isa => 'pf::Authentication::Source::SAMLSource',
lazy => 1,
builder => '_build_source',
);

has '+route_map' => (default => sub {
tie my %map, 'Tie::IxHash', (
Expand Down Expand Up @@ -108,6 +112,11 @@ sub assertion {
}
}

sub _build_source {
my ($self) = @_;
return $self->app->profile->getSourceByType('SAML');
}

=head1 AUTHOR
Inverse inc. <info@inverse.ca>
Expand Down

0 comments on commit f7db876

Please sign in to comment.