Username Password Authentication error in spring boot using Bсrypt

Viewed 37

I make Spring boot app.

Login with email = mail1@gmail.com and password bob. I have password in BD which is HASH from bob. I get this error on logging:

this = {DaoAuthenticationProvider@10456} 
    username = "mail1@gmail.com"
    authentication = {UsernamePasswordAuthenticationToken@10457} "UsernamePasswordAuthenticationToken [Principal=mail1@gmail.com, Credentials=[PROTECTED], Authenticated=false, Details=WebAuthenticationDetails [RemoteIpAddress=0:0:0:0:0:0:0:1, SessionId=D7E584DE966931641FAB9DAB525EDC9E], Granted Authorities=[]]"
    ex = {JpaSystemException@10458} "org.springframework.orm.jpa.JpaSystemException: collection was evicted; nested exception is org.hibernate.HibernateException: collection was evicted"

I'm reading the java.docs and can not understand what to do: The principal and credentials should be set with an Object that provides the respective property via its Object.toString() method. The simplest such Object to use is String.

Could you explain please?

My git: https://github.com/anatoliy19/3.1.2.git

1 Answers

I added annotations from Lombok to @manytomany and it came to work @EqualsAndHashCode.Exclude @ToString.Exclude

Related