I'm using spring-security-oauth2-authorization-server-1.1.1
with the JdbcOAuth2AuthorizationService
to persist OAuth2Authorization
instances to a database. I would like to include additional details about the request in the database. In particular I'm looking to capture the User-Agent HTTP header and the request's IP address.
Looking at OAuth2Authorization
and OAuth2Authorization.Builder
, there's an attribute Map that can be populated with extra details like this, but I'm not sure if this is an appropriate use the attributes feature, nor do I see a way to hook into spring-security to capture details from the HttpServletRequest
.
Thanks in advance!