Created beneficiary and associated with user

This commit is contained in:
rajesh
2024-09-27 16:44:39 +05:30
parent 40e5ab9e91
commit ee80959329
10 changed files with 223 additions and 77 deletions

View File

@@ -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;

View File

@@ -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 {