Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Read Me First

The following was discovered as part of building this project:

Getting Started

Spring Boot Security

This is an example of Spring Boot Security with a custom login page. It contains

  • authentication
  • authorization
  • custom login page

There are two users as follows:

  • "user" with a password of "user"
  • "admin" with a password of "admin"

The password for "user" is hashed using bcrypt-generator.com and hard coded into WebSecurityConfiguration.kt The password for "admin" is hashed using BcryptPasswordEncoder().

Logout capability is available by adding the "logout" keyword to the login URL as below http://localhost:8080/login?**logout** Logout is available in

  • /all - Implemented in html
  • /admin page - embedded into the return string of admin () method

Access to pages is as follows:

  • "user" has access to /user
  • "admin" has access to /admin
  • /all is accessible to authenticated users - "user" and "admin"
  • / is accessible without authentication

To try it out:

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely:

Additional Links

These additional references should also help you: