Class UserPrincipalDetailsService

  • All Implemented Interfaces:
    org.springframework.security.core.userdetails.UserDetailsService

    @Service
    public class UserPrincipalDetailsService
    extends java.lang.Object
    implements org.springframework.security.core.userdetails.UserDetailsService
    • Constructor Detail

      • UserPrincipalDetailsService

        public UserPrincipalDetailsService()
    • Method Detail

      • loadUserByUsername

        public org.springframework.security.core.userdetails.UserDetails loadUserByUsername​(java.lang.String s)
                                                                                     throws org.springframework.security.core.userdetails.UsernameNotFoundException
        This method calls the user collection to see if it exists and converts it into UserDetails
        Specified by:
        loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsService
        Parameters:
        s - user login
        Returns:
        user details instance
        Throws:
        org.springframework.security.core.userdetails.UsernameNotFoundException - if the user doesn't exist it throws an exception
      • saveAuditSettings

        public UserAuditSettings saveAuditSettings​(UserAuditSettings auditSettings)
        This method saves the user settings for auditing
        Parameters:
        auditSettings - user settings entity
        Returns:
        data as entity
      • loadAuditSettings

        public java.util.Optional<UserAuditSettings> loadAuditSettings​(java.lang.String id)
        This method loads the user settings for auditing
        Parameters:
        id - user settings entity id
        Returns:
        data as entity
      • deleteAuditSettings

        public void deleteAuditSettings​(java.lang.String id)
        This method deletes the user settings for auditing
        Parameters:
        id - user settings entity id