I've been reading op on several Oauth2 guides and tutorials to figure out how to setup a Oauth2 security flow using Spring security (version 5.x). The flow itself is working correctly and I'm ending up with a JESSION cookie on my frontend application (Angular).
However, instead of using a jsessionid, I would like to use a token to authenticate with my backend. I've experimented a bit with sending my access token as bearer token but my SecurityContext remains emty. The only time when I actually get some values in my SecurityContext is when I pass the jsessionid as cookie in my request.
Is this a setting that can be toggled in Spring Security or do I need to write some custom code to pull this of?