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
Post a Comment