i
I configur FranceConnect protocol openIDConnect with cas apereo version cas.version=5.0.3.1
I add in cas.properties
##
# CAS Authentication Attributes
#
cas.authn.attributeRepository.attributes.uid=uid
cas.authn.attributeRepository.attributes.displayName=displayName
cas.authn.attributeRepository.attributes.cn=commonName
cas.authn.attributeRepository.attributes.affiliation=groupMembership
cas.authn.pac4j.oidc.id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
cas.authn.pac4j.oidc.secret=ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
cas.authn.pac4j.oidc.discoveryUri=http://localhost:8082/cas/js/fc.json
cas.authn.pac4j.oidc.useNonce=true
cas.authn.pac4j.oidc.preferredJwsAlgorithm=HS256
cas.authn.pac4j.client.authn.typedidused=true
cas.authn.pac4j.oidc.maxClockSkew=30
In my configuration cas i have tow connexion , i add thirth connexion with openid
@Autowired
@SuppressWarnings("SpringJavaAutowiringInspection")
private ClientAuthenticationHandler clientAuthenticationHandler;
final Map<AuthenticationHandler, PrincipalResolver> handlerResolverMap = new LinkedHashMap<>();
handlerResolverMap.put(clientAuthenticationHandler, new PersonDirectoryPrincipalResolver());
@Configuration
public class AuthenticationConfig {
@Autowired
@SuppressWarnings("SpringJavaAutowiringInspection")
private ClientAuthenticationHandler clientAuthenticationHandler;
/**
* Initialisation du manager d'authentification
*
* @return Objet AuthenticationManager
*/
@Bean
public AuthenticationManager authenticationManager(HttpClient simpleHttpClient) {
// Initialisation du CAS manager
final PolicyBasedAuthenticationManager policyBasedAuthenticationManager = new PolicyBasedAuthenticationManager();
// Handler et Resolver correspondants
final Map<AuthenticationHandler, PrincipalResolver> handlerResolverMap = new LinkedHashMap<>();
handlerResolverMap.put(clientAuthenticationHandler, new PersonDirectoryPrincipalResolver());
handlerResolverMap.put(authenticationHandlerImpl(), principalResolver());
handlerResolverMap.put(serviceTicketAuthenticationHandler(), serviceTicketCredentialsToPrincipalResolver());
policyBasedAuthenticationManager.setHandlerResolverMap(handlerResolverMap);
// Populators
final List<AuthenticationMetaDataPopulator> populators = new ArrayList<>();
populators.add(authenticationMetaDataPopulator());
policyBasedAuthenticationManager.setAuthenticationMetaDataPopulators(populators);
return policyBasedAuthenticationManager;
}
}
The problem: clientAuthenticationHandler is always null
Have you a solution please.
Thank your for help.
regard.
Kamel