Login using one time password

2 messages Options
Embed this post
Permalink
Thai Son Cung

Login using one time password

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi Matt Raible,

Other that using login page. Is there any other way for user to authenticate?

In my case, user database are pre-populated, so no signup is needed. And user will be send an one-time password to his mobile phone. He can use this one-time password to login for the first time to enable his account and set his password.


Best Regards,  

Tyson Cung
Hello Technology Pte. Ltd. 
180 Cecil Street, #07-03, Bangkok Bank Building, Singapore 069546
(F : +65 6534 7133 (HP : +65 93896675
* [hidden email] 


Thai Son Cung

Re: Login using one time password

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
HI 

I have find out the solution just by checking the otp value and set the security context


UsernamePasswordAuthenticationToken token =

                        new UsernamePasswordAuthenticationToken(user.getUsername(), user.getPassword(), user.getAuthorities());

                token.setDetails(user);

                SecurityContext context = new SecurityContextImpl();

                context.setAuthentication(token);

                SecurityContextHolder.setContext(context);


Best Regards,
  

Tyson Cung
Hello Technology Pte. Ltd. 
180 Cecil Street, #07-03, Bangkok Bank Building, Singapore 069546
(F : +65 6534 7133 (HP : +65 93896675
* [hidden email] 


On Jun 15, 2009, at 4:29 PM, Thai Son Cung wrote:

Hi Matt Raible,

Other that using login page. Is there any other way for user to authenticate?

In my case, user database are pre-populated, so no signup is needed. And user will be send an one-time password to his mobile phone. He can use this one-time password to login for the first time to enable his account and set his password.


Best Regards,  

Tyson Cung
Hello Technology Pte. Ltd. 
180 Cecil Street, #07-03, Bangkok Bank Building, Singapore 069546
(F : +65 6534 7133 (HP : +65 93896675
* [hidden email]