on 07-12-2009 12:55 PM
Hi,
I'm looking for a solution to authenticate a user in Flex. I want to get to know, to which roles a specific user is assigned (e.g. XMII Users etc.). I wanted to do that via Webservice that calls a transaction and this transaction delivers the assigned roles. Is that possible? Or is there another way to find out, to which roles the user is assigned (without using applets!!!)?
Thanks!
Anika
I think I understand.
Make a transaction with a input parameter for the username, you want the roles for. This transaction you use this URL
/XMII/Illuminator?Service=Admin&Mode=UserAttribList&Group=UserName&
to make a HTTP post by building the URL dynamic and then supply the URL with one fixed hardcoded MII login you know exists. Then returns the roles or something to the caller
BR
Poul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Poul,
I understand your suggestion. My problem is the username. The user will log on to the MII portal. There he starts the Flex application (e.g. integrated in a HTML file) - without further login, so that the Flex application doesn't know any user details (especially no username). I always have to ask first via HTTPService for details and for this, I have to pass credentials for the authentication to execute this HTTPService on MII. So I could not pass the expected username to the transaction. That's the main problem, I think. I have to find a way, either to execute this HTTPService without passing the credentials or to execute a service, that automatically delivers the information for the logged in user (in MII) and not for the passed user.
Bye,
Anika
Hi Anika, hi Poul,
what about this idea:
- create a technical user in MII / NetWeaver UME to be used with the HTTP calls as credentials to get MII information
- after logging in to MII, call a irpt page instead of html
- with irpt, you have access to the MII session parameters, e.g. ,
- maybe you can then pass the IllumLoginName, IllumLoginRoles from the webpage to your Flex app?
Having the login name of the user and the (static) credentials of the technical user, you can call any MII URL to get the information you want.
Michael
Hi Michael,
that's maybe a possible solution I was just thinking about as well. It may possible to define a variable in flex that can be filled from outside.
I also thought about cookies or sharedObjects, but I suppose, the first one may fall prey to security restrictions of the customer and the second idea is limited to flex, I think (or can I fill shared objects via javascript or something like this?).
Regards
Anika
Anika,
your scenario you not need to login from the Flex as Rick mention, because you will use autom. the Session Cookie
from your MII Login. So no need to login from Flex. Use the URL:
/XMII/Runner?Transaction=YourTRX&OutputParamater=YourOutputparameter&YourInputParameter=YourInputParameterValue&Content-Type=text/xml.
Please take a look on Ricks post. He explain it very good.
Cheers
Pedro
Hi guys,
thanks a lot for your support.
Now, I have several ways to solve that issue. It's correct, I don't need the credentials when I'm running it on the MII portal. I wasn't really sure about it :). So I could call a transaction or the session variables via HTTPService. But I think I will use the irpt-approach: Flex generates already the HTML file for the embedded swf and I put it a hidden field in it: <input type="hidden" value="" id="roles" /> - now I can read out the value with javascript and pass it directly to a variable of the flex application: var rolesVariable = "userDetails="+document.getElementById("roles").value; - in the AC_FL_RunContent call I pass it to the internal variable of flex: "flashvars",rolesVariable and now I can work with it internally - perfect (just need to rename the html file to irpt)! So I don't need to do an extra HTTP call.
Regards
Anika
As of MII 12.0, you need to login when calling a transaction from outside and it is right the URL you mention returns the rights for the user you then supply.
What if you use this one instead
/XMII/Illuminator?Service=Admin&Mode=UserAttribList&Group=UserName
Then supply the username you want the details for ?
BR
Poul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use an HttpService call from Flex to invoke the following URL to retrieve any session parameters:
If you use "IllumLoginRoles" for the PropName property, you will receive a comma-separated list of the roles for currently logged in user.
Note also that using the servlet-based approach (versus Web Services) allows you to use the same cookie that MII uses for authentication, so there is no need to pass credentials to each MII call once the user is logged in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
If I remember correct, you should be able to get the roles of the current user the following way. In your transaction make a transaction parameter named equal to the session parameter, i.e. IllumLoginRoles. Then in your xacute connector select autobind. In this way the roles should be mapped automatic to the transaction parameter.
You can also use the following web calles inside your transaction.
/XMII/Illuminator?Service=SystemInfo&Mode=RoleList
/XMII/Illuminator?Service=SystemInfo&Mode=UserList&Group=XMII%20Administrators
/XMII/Illuminator?Service=Admin&Mode=UserAttribList&Group=UserName
/XMII/PropertyAccessServlet?Mode=List
BR
Poul.
Thanks for your reply,
it works quite good. I used http://server/XMII/PropertyAccessServlet?Mode=List to get all the user information. But I always have to post login data for the HTTPService "<XacuteLoginName>Username</XacuteLoginName> and <XacuteLoginPassword>Password</XacuteLoginPassword>" - otherwise I get the error "Error #1090". So the information I receive are the information for the XacuteLogin user. But I want to get the information for the logged in MII user.
Actually, I'm executing my little application on my local machine and it's not yet included in a HTML file on the MII server or something like that. Could that be a reason? So if I include my flex application in a HTML file on the MII server, should it work then without sending login data?
Thanks a lot
Anika
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.