In this tutorial, we will show you how to implementing custom user details for Grails 4 and Spring Security web applications. As a default, the Grails 4 Spring Security generated user domain or entity has only username and role fields that can get or show in the SecurityTagLib. So, we will add additional fields to display user info or details in the SecurityTagLib.

This tutorial divided into several steps:

  • Step #1: Create a New Grails 4 Application
  • Step #2: Add Spring Security Plugin
  • Step #3: Generate User and Role Domain
  • Step #4: Create a Custom User Details
  • Step #5: Add a Secure Page
  • Step #6: Run and Test Grails 4 Spring Security Application

Full article here:
https://www.djamware.com/post/5ef41459a3120f3df580ec52/grails-4-and-spring-security-custom-user-details-example

Source code:
https://github.com/didinj/grails-4-spring-security-custom-user-details.git

#spring #grails #security #developer

Grails 4 and Spring Security Custom User Details Example
2.10 GEEK