OpenAM : Can't login with custom authentication module -


i developed custom authentication module following example , installed top level realm. openam 11.0.0.

enter image description here

then open test page auth module. enter image description here

the login fails error "login/password combination invalid."

however, if open /openam after seeing error message, says logged-in.

enter image description here

here process code of amloginmodule

public int process(callback[] callbacks, int state) throws loginexception {      if (debug.messageenabled())     {         debug.message("authentication module process() called. state: " + state);     }       switch (state)     {          case state_begin:         // no time wasted here - modify ui ,         // proceed next state         substituteuistrings();         return state_auth;          case state_auth:         return isauthconstants.login_succeed;          case state_error:         return state_error;         default:         throw new authloginexception("invalid state");      }  } 

you can see username / password accepted. debug log shows module called correctly.

[root@a3652f4b6f0f debug]# tail /openam/openam/debug/em  em:06/15/2015 06:58:20:462 utc: thread[http-bio-8080-exec-4,5,main] authentication module process() called. state: 1 em:06/15/2015 06:58:20:540 utc: thread[http-bio-8080-exec-4,5,main] authentication module process() called. state: 2 em:06/15/2015 06:58:27:501 utc: thread[http-bio-8080-exec-4,5,main] authentication module init() called em:06/15/2015 06:58:27:507 utc: thread[http-bio-8080-exec-4,5,main] authentication module process() called. state: 1 em:06/15/2015 06:58:27:625 utc: thread[http-bio-8080-exec-4,5,main] authentication module process() called. state: 2 

please why see error "login/password combination invalid." in test login page?

the problem don't have user profile login. need have username in datastore pass sampleauthprincipal("username") constructor .

@override public principal getprincipal() {     return new sampleauthprincipal("username"); } 

this should resolve problem.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -