- Notifications
You must be signed in to change notification settings - Fork 98
Description
Hey!
First of all, thanks for that amazing library. 👏 In our current project we have the problem that we have to extend/enhance the AuthInfo with additional information. Currently it seems not possible to do that.
As an example:
We have the case that we want to get the audience query parameter from the AuthorizationRequest and make it accessible within the createAccessToken(authInfo) method so we can include it in our JWT access token. The problem here is, that the createAccessToken method only takes the AuthInfo input parameter, which is a case class and built directly within the different GrantHandlers already. So there seems to be no way on how to put in additional information.
I made two proposals in two different branches that could maybe solve the issue:
- This proposal converts the AuthInfo from a case class to a trait and provides a DefaultAuthInfo (equal to the currently existing AuthInfo) to not break the API. Diff: fgrutsch@e5568b0
- This proposal also converts the AuthInfo from a case class to a trait, but additionaly makes the AuthInfo typed on the DataHandler. This would make usually probably easier, but comes with the disadvantage that it breaks the API. Diff: fgrutsch@b727b90
Please take a look at them and let me know your opinion, so that I could potentially open up a PR.
In case we are just overseeing something on how we could already achieve that with the current implementation, please let me know as well. Thanks 😉