mitreid-connect / OpenID-Connect-Java-Spring-Server

An OpenID Connect reference implementation in Java on the Spring platform.
Other
1.48k stars 765 forks source link

Class is not a known entity type. #1531

Open Valantir007 opened 4 years ago

Valantir007 commented 4 years ago

Hi, I write my own api to create users but always when I call:

SimpleGrantedAuthority authority = new SimpleGrantedAuthority("ROLE_USER"); ArrayList<GrantedAuthority> authoritiesList = new ArrayList<>(); authoritiesList.add(authority); new User(tempUser.getUsername(), tempUser.getPassword(), tempUser.isEnabled(), false, false, false, authoritiesList);

I got error: "Object: org.springframework.security.core.userdetails.User@364492: Username: test; Password: [PROTECTED]; Enabled: true; AccountNonExpired: false; credentialsNonExpired: false; AccountNonLocked: false; Granted Authorities: ROLE_USER is not a known entity type."

Can you help me?