Access secured procedure without showing login form in Worklight v6.0

90 Views Asked by At

I have valid username, password for access secured(security test with realm) procedure. I need to access secured procedure without asking or showing login form.

How do I achieve this?

2

There are 2 best solutions below

1
On

you can manually set authenticated user identity in adapter code with WL.Server.setActiveUser API. Once user identity is set - secured procedure invocation will succeed. Basically - create unprotected proc1 and protected proc2. invoke proc1, set user identity, invoke proc2 from proc1.

2
On

I assume you are using Form based authentication. Change your authenticationConfig.xml file and change the authentication and login modules to something else (some other way in which you can receive username and password). Basic authentication using HTTP is a good way for which you can use a Header authenticator