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 [127.0.0.1] and path [/admin/event]
Virtual host mapping could not be resolved for host [127.0.0.1] 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

mapping.site.host = localhost
mapping.site.source = /
mapping.site.target = /portal/master/blackapp
mapping.site.userStore = profiles

mapping.admin.host = localhost
mapping.admin.source = /admin
mapping.admin.target = /admin
mapping.admin.userStore = system

You get the error because 127.0.0.1 is not in your list of vhosts. 127.0.0.1 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.

#mapping.admin.host = localhost
#mapping.admin.source = /admin
#mapping.admin.target = /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 http://127.0.0.1:8890/admin/event 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.

2 Likes