Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

spring mvc authentication

 
sal sathya
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
in an web application we are using authentication by spring,

but the problem is where a user is created the password is encoded with md5 + some logical password,
if i uses


the password is not decoding and i can't login ,how to write a custom decode class and pass that password

please help.
 
Murali Ranga
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Message digest functions use one-way functions and it is infeasible to reverse/decrypt the message digest and discover the original data
For comparing the data/password,
The Enter password needs to encrypted and compared with the already existing encrypted data
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, in Spring Security when it sees you are using MD5, and you do the login form with j_username and j_password, the Spring Security will automatically encode the incoming password to then match against what is encoded in the database and authenticate for you.

What are you doing that is different?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic