Created beneficiary and associated with user
This commit is contained in:
@@ -133,8 +133,8 @@ public Saml2AuthenticationRequestResolver authenticationRequestResolver(RelyingP
|
||||
authnRequest.setRequestedAuthnContext(buildRequestedAuthnContext());
|
||||
|
||||
// Log the SAML AuthnRequest after setting context
|
||||
String samlRequest = SamlRequestLogger.convertSAMLObjectToString(authnRequest);
|
||||
logger.info("SAML AuthnRequest after setting context: " + samlRequest);
|
||||
// String samlRequest = SamlRequestLogger.convertSAMLObjectToString(authnRequest);
|
||||
logger.info("SAML Authentication Request.");
|
||||
});
|
||||
|
||||
return authenticationRequestResolver;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class SamlSuccessHandler implements AuthenticationSuccessHandler {
|
||||
|
||||
logger.info("SAML login successful for user: " + principal.getName());
|
||||
String cf = userAttributes.get("CodiceFiscale").get(0).toString();
|
||||
UserEntity userEntity = userRepository.findByCodiceFiscale(cf).orElse(null);
|
||||
UserEntity userEntity = userRepository.findByBeneficiaryCodiceFiscale(cf).orElse(null);
|
||||
if (userEntity == null) {
|
||||
redirectUrl += "/registration?temp_token=" + token;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user