on 07-18-2006 8:35 PM
Hi,
Does anyone know how the MAM application know that the user is authenticated? I was not able to find this in the code, and am hoping that someone knows. For example:
1. I run the MI Client (which starts the Mobile Engine)
2. Press <CTRL> + N to open the MI Client application in IE
3. Log in with my user ID and password
4. Go into the MAM, access a page (i.e. UVM) and BOOKMARK that URL
5. Return to MI Home and Log off
6. Now, if I access the my bookmark of the MAM, it will automatically forward me back to the MI Client Login page.
So does anyone know how it does this? Does anyone know what Java API or JSP include this is within the code?
I am currently running MAM30 SR/2, on MI 2.5 SP15.
Many thanks!
Jeffrey
hello jeff,
MI supports only one logon user. It doesn't allow multiple
users to logon at the same time. Once the current user logs
off, your direct access to your application by specifying
the URL (thru a bookmark or address box) will be redirected
to the login page.
how MI do this? where does it check this?
this is actually in the AbstractMeHttpServlet.service
implementation. when you directly access your application,
the service method of your servlet is actually called,
usually, MI application does not override this method, so
the super class's which is the AbstractMeHttpServlet's
method is called. here it checks if the currentUser is
null, once it is, the browser will be redirected to the
MI home page.
Generally, in Tomcat, if your servlet implements the
HttpServlet interface, you won't be directed. But for MI,
user is checked in the AbstractMeHttpServlet, which every
MI application for JSP runtime must extend.
hope this helps.
regards
jo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jeffery,
I think , it s not the peculiarity of the MAM application, but this is the property of the mobile engine itself.
Mobile engine is using com.sap.ip.me.api.user.UserManager class for logon and logout activities.
In this class ,we can see various methods like , getInstance() ,logOnUser(...), logOutCurrentUser() , getCurrentUser() .. etc.
In these methods ,
static UserManager getInstance() method - which is used to create an instance of UserManager.
getCurrentUser() -- Gets the current user working on the Mobile Infrastructure device
logOutCurrentUser() -- Logs out the current user. Stops all running aplications and removes the user configuration.
logOnUser(String userName , String password) - Logs on a user to the Mobile Engine. If there is another user logged on the user will be logged out and the new user gets the current user (only if password and username match).
For the same user , it will use the same user configuration parameters. So in two seperate windows , it is using the user configurations of the logged in user. In seperate IE window , it will be using another session , but using the same user configuration parameters.
When the user logs out from the mobile engine or from the IE window , this will removes the current login user's user configuration .
So when we logout from one window , it is ultimately removing the same user configuraion . This is the exact reason.
The mobile engine related class files and interfaces are there in the Meg.jar file which is located within the lib directory
of MobileEngine installation. If we have third party decompilers , we can decompile the class files within this jar file.
just refer these links also.
Regards
Kishor Gopinathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.