Discussion:
Problem to connect with Spring Security Core plugin with user created from DB
Raja CHARFI
2014-05-19 11:15:03 UTC
Permalink
Hello,

I am working with two grails applications using grails 2.3.6 and Spring
Security Core plugin 1.2.7.3

I have created new User using SQL request in my service in my first
application, then I am trying to connect with that User in my second
application but I have always the same message "Sorry, username or password
doesn’t exist".
When I am trying to catch Type of exception I get this exception
"BadCredentialsException".
But when I am executing "User.list()" from console I have that user with
that the same username and password.

I don't understand where is the problem because I have really the correct
User in my Data base.

Please any one have the same problem or can help me.
Thanks :)



--
View this message in context: http://grails.1312388.n4.nabble.com/Problem-to-connect-with-Spring-Security-Core-plugin-with-user-created-from-DB-tp4656934.html
Sent from the Grails - dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email
Raja CHARFI
2014-05-23 15:04:06 UTC
Permalink
Yes I can read my password and when I execute decoding password By
console I have the same password I was entry.
In my code I write this :

My password is "test123", I encrypted its by spring security service and
I get it from database.
I execute my SQL request by script shell from another grails application
and when I tried to connect with this user I can't.
But when I am trying to refresh my login/auth page two or three times I
connect successfully, for the first I think that I am entering a wrong
password or wrong username but when I verify I belive that my password
and my username are correct.

I think that the problem is with session hibernate because after
refreshing page it works. I can't get solution for this problem and I am
blocked.


Best Regards,


<http://www.proxym-group.com>
<https://www.facebook.com/ProxymIT>
<https://twitter.com/proxymit>



Raja Charfi

Software Developer

***@proxym-it.com <mailto:***@proxym-it.com>
+216 24 75 53 03
charfi.raja <skype:charfi.raja?call>
Can you read the password in the database? If so, that may be your
problem. I think, by default, the plugin will use SHA-256 to encrypt
the password. So if you put a plain text password in the database,
when you log in, you will be comparing a SHA-256 password vs plain text.
------------------------------------------------------------------------
If you reply to this email, your message will be added to the
http://grails.1312388.n4.nabble.com/Problem-to-connect-with-Spring-Security-Core-plugin-with-user-created-from-DB-tp4656934p4657005.html
To unsubscribe from Problem to connect with Spring Security Core
plugin with user created from DB, click here
<http://grails.1312388.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4656934&code=cmFqYS5jaGFyZmlAcHJveHltLWl0LmNvbXw0NjU2OTM0fDE5MjI1NTY1Mjc=>.
NAML
<http://grails.1312388.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
cajgbhce.png (27K) <Loading Image...>
hagdhbif. (12K) <http://grails.1312388.n4.nabble.com/attachment/4657006/1/hagdhbif.>
cbbcbahf. (11K) <http://grails.1312388.n4.nabble.com/attachment/4657006/2/cbbcbahf.>
cjacajdf. (11K) <http://grails.1312388.n4.nabble.com/attachment/4657006/3/cjacajdf.>
feddiagf. (11K) <http://grails.1312388.n4.nabble.com/attachment/4657006/4/feddiagf.>
bjddgeha. (11K) <http://grails.1312388.n4.nabble.com/attachment/4657006/5/bjddgeha.>
ibeedbdh. (16K) <http://grails.1312388.n4.nabble.com/attachment/4657006/6/ibeedbdh.>
hebgiiia.png (24K) <Loading Image...>
bdeieeie.png (682 bytes) <Loading Image...>
gcdjaaag.png (19K) <Loading Image...>




--
View this message in context: http://grails.1312388.n4.nabble.com/Problem-to-connect-with-Spring-Security-Core-plugin-with-user-created-from-DB-tp4656934p4657006.html
Sent from the Grails - dev mailing list archive at Nabble.com.

Loading...