As a developer, I would like to extract a service from the UserProfileFilter in order to facilitate future refactoring (cache, re-use, ...)
As part of this work, we should decouple this filter from using the user's SsoToken: this is an issue when using this filter with OAuth 2.0 Access Tokens (instead of plain old SSO/CDSSO). As a replacement, it should grab the agent token from credentials declared in AmService, to query the AM /users/<username> endpoint .
- UserProfileService (and dependent classes) extracted as an interface into the IG toolkit
- AmService expose it with a getter method
- UserProfileFilter adapted to make use of this new service
- Deprecate ssoToken configuration point
- Add a username configuration point as an expression that evaluates to the profile's username