So some after fighting with spring-authorisation-server, it now mostly works behind the oauth2-proxy.
One final problem is now, that the oauth2-proxy is not happy, that there is no email adress provided during the flow.
But i haven't found anything inside the documentaion how an email adress can be provided. The userdetails services looks as simple as below.
So if anyone can give me an idea how to add emails for oauth2 .. that would be great
@Bean
public UserDetailsService userDetailsService() {
UserDetails userDetails = User.withDefaultPasswordEncoder()
.username("user1")
.password("user1")
.roles("USER")
//.authorities(authority)
.build();
return new InMemoryUserDetailsManager(userDetails);
}
I would expect that email adresses could be added