java - Passing values to sharedState parameter in LoginModule -


the loginmodule interface has method:

public void initialize(subject subject, callbackhandler callbackhandler,                     map<string, ?> sharedstate, map<string, ?> options); 

i can pass values options (fourth parameter) extending configuration:

public class customconfiguration extends configuration {     private map<string, ?> options;     private string loginmodulename;      public customconfiguration()     {     }      public customconfiguration(final string loginmodulename, final map<string, ?> options)     {         this.loginmodulename = loginmodulename;         this.options = options;     }      @override     public appconfigurationentry[] getappconfigurationentry(string name)      {         appconfigurationentry entry = new appconfigurationentry(loginmodulename,                                                                 appconfigurationentry.loginmodulecontrolflag.required,                                                                 options);         return new appconfigurationentry[] { entry };     } } 

i'm trying use ldaploginmodule. uses sharedstate (third parameter) values getting username , password (in login()):

username = (string)sharedstate.get(username_key); password = (char[])sharedstate.get(password_key); 

my question is, how can pass values sharedstate?

that's not it's for. it's passing values between loginmodules.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -