Invoking getIdProviderConfig and get null

Hi there,

I’ve installed the application LDAP ID Provider and in my view I use lib auth, trying to get information from provider config but I get null.

Did I miss any settings or …? Any help would be appreciated.

Did you setup a vhost and specify which provider to use there first?
In order to get an idProvider into your request process, you need to configure a vhost.

Yes, I did. But got the error, so I decided to check (if the virtualhost is off) using getIdProviderConfig give any information.

When I do enable vhost, I get this error message

Virtual host mapping could not be resolved for host [] and path [/admin/event]
Virtual host mapping could not be resolved for host [] and path [/admin/rest/status]

And I have taken the example for my project right from this post Ldap how to use.

My vhost data

enabled = true = localhost = / = /portal/master/blackapp = profiles = localhost
mapping.admin.source = /admin = /admin
mapping.admin.userStore = system

You get the error because is not in your list of vhosts. is not always the same as localhost!

I wish it was the reason but no :slight_smile:

I’ll tell you more, all works correctly if I unset admin mapping. = localhost
#mapping.admin.source = /admin = /admin
#mapping.admin.userStore = system

My localhost works without problem. So, I decided to find out about those urls and when I try to find the link I don’t see it. And I can’t understand where the system gets it? That’s the problem.

I guess I have found the problem. Seems it didn’t like the name for storage – ‘profiles’. Anyway, what I did was: I removed old storage and created a new one, named it ‘ldap-users’, restarted and it works now.

And still, getIdProviderCofing gives me null.

I got the answer from Christian Westgaard in slack. He explained that this function can be used in idprovider only. Not outside that lib.

So, this issue can be closed. Thank you all.