Quantcast
Channel: SCN : Discussion List - SAP HANA Cloud Platform Developer Center
Viewing all articles
Browse latest Browse all 3131

UserProvider is null. Why?

$
0
0

Hi,

 

I just deployed my application to my sapdev account, using the SAP ID Service as a Userprovider.

Then I want to get the currently logged-in user with the following code:

 

UserProvider userProvider = UserManagementAccessor.getUserProvider();

user = userProvider.getUser(request.getUserPrincipal().getName());

 

It fails, because the userProvider is null. I remember using this code some time ago and it worked, so I dont understand why it fails? I checked the included libraries, and they are okay.

Does this not work because I am using a sapdev account and need a full-account? Or do i need to do some configuration in the account itself?

 

Edit: I also added the necessary <login-config> in the web.xml, i tried with FORM and SAML2 which seem to be the same when used without <form-login-config>?

I also added a security role and added the role to my user using the cloudcockpit.

 

Regards,

Kevin


Viewing all articles
Browse latest Browse all 3131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>