Skip to content

Enhancing AuthInfo #126

@fgrutsch

Description

@fgrutsch

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:

  1. 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
  2. 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 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions