Custom user_checker ignored
Hi, I 'm trying to define a custom user_checker by doing :
saml:
context: app
pattern: /saml(.*)
user_checker: my_custom_user_checker
...
But the user_checker is ignored and the default one is used which I don't want.
The only way i have found so far is to override the following service in my app :
security.authentication.provider.lightsaml_sp:
class: LightSaml\SpBundle\Security\Authentication\Provider\LightsSamlSpAuthenticationProvider
arguments:
- ~ # provider key
- ~ # user provider
- ~ # force
- "@my_custom_user_checker"
- "@lightsaml_sp.username_mapper.simple" # username mapper
- ~ # user creator
- "@lightsaml_sp.attribute_mapper.simple" # attribute mapper
- ~ # token factory
abstract: true
I m not sure if this is a bug or not but I think the bundle should take the 'user_checker' parameter (if given) instead of using the default one.
I'm experiencing the same issue. The workaround I found was to override the Symfony default user_checker config. In my services.yaml I add:
security.user_checker: class: App\Security\MyOwnClass
It's not a problem for me at all, but it should get the user_checker from the firewall config that it's being exeuted.