Md-MamunAbdulKayum / springboot-security-examples

These examples include both Springboot-Security examples using in-memory setup and database setup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

springboot-security-examples

These examples include both Springboot-Security example using in-memory setup and database setup

For in-memory Spring security setup:

Run the project as a Java project and hit the below URL in your browser:
http://localhost:8888/SpringSecurityInMemorySetup/

Login page:

loginpage

Invalid Input page:

invalidinput

With Role Employee and Admin page:

emaployeeandadmin

With Role Employee and Hr-Manager page:

emaployeeandadmin

With Role Employee and Manager page:

withRoleEmployeeAndManager

Logout page:

logoutpage

For Database-JDBC Spring security setup:

Run the project as a Java project and hit the below URL in your browser:
http://localhost:8889/SpringSecurityInMemorySetup/

Before runing the project, run the sql script springsectest.sql. I have used maria DB. I have several users for testing the security:

user               pass 
-------------------------------------- mamun mamun111
sourav sourav111
kayum kayum111
sourav sourav111
abraham abraham111

I have used https://www.devglan.com/online-tools/bcrypt-hash-generator to generate Bcrypt encrypted password and saved to the database. Spring security by default uses Bcrypt, so we will be entering plain text as password in the password field, Spring will generate Bcrypt encrypted password and will match the password with database's password.

About

These examples include both Springboot-Security examples using in-memory setup and database setup


Languages

Language:HTML 71.1%Language:Java 16.1%Language:CSS 7.5%Language:TSQL 5.4%