Closed
Description
While trying to logout from Spring Authorization Server when spring cloud gateway (Oauth2client) calls logout endpoint, I found SID is null because AuthorizationService or Userdetails uses Jdbc or Jpa.
I used UserDetailsService for creating a UserDetails object.
While debugging I found SessionRegistryImpl is returning null SessionInformation. Highlighted line returns null because 'principal(UserDetails)' is different from ones' present in 'principals'.
I created a sample which is similar to the issue I am facing right now. When you run the sample, SID will be null but when you comment out JdbcAuthorizationService config SID will be present in IDToken.