add SAML Auth hook (#2730)
New hooks: samlGotAuthnResponse samlGenerateAuthnRequest
This commit is contained in:
parent
0998530118
commit
6d3f40b2fd
|
@ -185,6 +185,12 @@ sub extractFormInfo {
|
|||
return PE_SAML_SSO_ERROR;
|
||||
}
|
||||
|
||||
# Call samlGotAuthnResponse
|
||||
my $h =
|
||||
$self->p->processHook( $req, 'samlGotAuthnResponse', $idp,
|
||||
$login );
|
||||
return PE_SAML_SSO_ERROR if ( $h != PE_OK );
|
||||
|
||||
# Check Destination
|
||||
return PE_SAML_DESTINATION_ERROR
|
||||
unless ( $self->checkDestination( $saml_response, $url ) );
|
||||
|
|
|
@ -1024,6 +1024,11 @@ sub createAuthnRequest {
|
|||
}
|
||||
}
|
||||
|
||||
# Call samlGenerateAuthnRequest hook
|
||||
my $h =
|
||||
$self->p->processHook( $req, 'samlGenerateAuthnRequest', $idp, $login );
|
||||
return if ( $h != PE_OK );
|
||||
|
||||
# Build authentication request
|
||||
unless ( $self->buildAuthnRequestMsg($login) ) {
|
||||
$self->logger->error("Could not build authentication request on $idp");
|
||||
|
|
Loading…
Reference in New Issue