i using spring security plugin in grails application. when saving password in encrypted format in database. want send plain password. how it?
another android application uses api. api, needs send particular user's password.
if reading passwords db: when passwords saved database hashed not encrypted, , the process involved in hashing not reversible, simple answer is: no cant.
you can use encryption when saving passwords database ( can decrypt them when come unusual scenarios in case) not idea, that why hashing functions preferred encryption algorithm saving passwords.
but if require , know how handle risks can intercept calls user.save(), intercept beforeinsert() , beforeupdate() methods password gets encoded.
so user's beforeinsert() , beforeupdate() methods this:
beforeinsert(){ ... yourapiservice.sendpassword(password) ... password = securityservice.encodepassword(password) ... } beforeupdate(){ ... if(isdirty('password')){ yourapiservice.sendpassword(password) ... password = securityservice.encodepassword(password) } ... }
Comments
Post a Comment