Forums Register Login

How to authenticate REST request against database by Spring Security by Java Configuration

+Pie Number of slices to send: Send
I am near to mad. I have to launch a project very soon. For the last few days i am searching and searching but unable to reach a conclusion. I am using AngualrJs, SpringBoot.
My requirement is that user will enter there user name and password, the user name and password will be authenticated against the data base and the user will be logged in. The password will be encrypted by some algorithms like "bcrypt" encryption.
It is a from type site.  For this moment it is enough just authenticating. I found some examples, most of them are in XML configuration and inMemoryAuthentication.
Would any one provide me  an example where a REST request coming from AngularJS will be authenticated against Database and after authentication a success message will be returned and also the log out facility will be there. I use maven.
OR is there any way that the XML security configuration can be loaded in to SpringBoot Application.  
 
1
+Pie Number of slices to send: Send
 

Ajharul Abedeen wrote:The password will be encrypted by some algorithms like "bcrypt" encryption.


Hashed, not encrypted.

Spring Security allows you to perform JDBC authentication. You need a DataSource in your application that you will use to access your database. Then you configure Spring to authenticate your users using this DataSource.

You then need to authorize users to perform certain requests.

Find the complete reference here: http://docs.spring.io/spring-security/site/docs/4.2.3.BUILD-SNAPSHOT/reference/htmlsingle/
Morning came much too soon and it brought along a friend named Margarita Hangover, and a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 603 times.
Similar Threads
Spring security support for double encryption
Spring Security Bcrypt encoding Login check
Spring Security no xml. How to configure MD5 Password Encoder
Using JPA for Username Password Authenticaion with MySQL in Spring REST Service?
FORM based authentication with MD5 encrypted password
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:48:09.