Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pass information between loginmodules

srinivas_cheruku
Explorer
0 Kudos

Hi,

We have two custom loginmodules as described below

1. LoginModule#1

- The LoginModule#1 does an external authentication and gets the external userid used for authentication.

2. LoginModule#2

- The LoginModule#2 based on the external userid, gets the SAP user id, validates the SAP user id using refreshUserInfo() and updates the sharedState with the valid SAP user name and principal.

I was thinking of using the sharedState to pass the information (eg: external user id) from LoginModule#1 to LoginModule#2, but from the documentation, I came to know that the sharedState can be updated only once. Is there any better way, to pass the information from one loginmodule to another.

Thanks,

Srini

1 ACCEPTED SOLUTION

tim_alsop
Active Contributor
0 Kudos

Hello,

Did you already find an answer to this question ? I think it is possible to store information in sharedstate in LoginModule#1 and then read this in LoginModule#2. Even though documentation suggests this is not the solution, I think if you try it you will find success.

Thanks,

Tim

4 REPLIES 4

tim_alsop
Active Contributor
0 Kudos

Hello,

Did you already find an answer to this question ? I think it is possible to store information in sharedstate in LoginModule#1 and then read this in LoginModule#2. Even though documentation suggests this is not the solution, I think if you try it you will find success.

Thanks,

Tim

WolfgangJanzen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hmm - I (personally) do not have a good feeling about a solution which is based on assumptions "proven by trial-and-error verification" (especially if there are documents stating that "this is the wrong approach"). It could happen that one day such "solutions" discontinue working - because someone else has identified them as "bug feature" and removed it.

I still prefer solutions that "work as designed".

Maybe because I don't really fancy such "sudden surprises" (at least not those with a negative impact).

-- Wolfgang

tim_alsop
Active Contributor
0 Kudos

Wolfgang,

I hear what you are saying, but we have found by looking at many of the SAP supplied login modules that they use the shared state to pass information from one login module to another. e.g. when an authentication module authenticates a user it passes the authenticated user id in the shared state so that the create ticket login module can take this and create an sso2 ticket. I doubt this will change for some time, but if it does, we can find another approach to use instead.

Take care,

Tim

srinivas_cheruku
Explorer
0 Kudos

Thanks.