GoVeg.com

Thursday, January 8, 2009

amclientsdk authentication as anonymous

This is the AM 7.1 documentation related to "anonymous".
This is the AM 7.1 documentation related to "AuthContext".
If the anonymous authentication has to be done through a browser, the parameter "service" is used.
By example,
https://lb-am-i.iam.finbel.intra/amserver/UI/Login?service=KioskMode
KioskMode is the name that was given to a module instance type "Anonymous" on the AM server.
After a user entered the URL into his browser, the user is authenticated as "anonymous". Good point !
So ? What has to be done to do the same using the amclientsdk ?
Very easy. The parameters service and name of the service have to be passed at "login time".
Example,
lc = new AuthContext(orgName);
lc.login(AuthContext.IndexType.SERVICE, "KioskMode");
The login context is used to retrieve the requirements and in the case of an anonymous only the username has to be passed.
If a "non anonymous" login has to be done, replace the parameters passed to lc.login by...nothing.
Example,
lc = new AuthContext(orgName);
lc.login();
In this case, the password has to be passed.

-rudy-

No comments:

Post a Comment