Skip to content

Conversation

@DAE-RobinHazewinkel
Copy link
Collaborator

Audience is now array based so that it can contain multiple audiences.

There is a short coming in the library that we cannot give an array along in the standard encoding parameters. If we would do that, it would always string escape it with some extra double quotes. The work around here is not to add it as an standard parameter but as a "additional claim". This way we would dynamically set the parameter the right way and the output is correct.

Copy link

@julianvv julianvv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The encoding makes sense, but I think it would be easier to add the Pos(" ", sAud) check to the Procedure Set Audience. This way the logic for all applications that currently implement this library will remain the same for setting the audience by simply calling Set Audience of oJWT to "Something SomethingElse". Also the return type for Function Audience could stay a string so we simply use a space-separated string.

Made it in a way that it still returns a string.
Copy link
Collaborator Author

@DAE-RobinHazewinkel DAE-RobinHazewinkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made it, backwards compatible by returning a space separated string.

Copy link

@julianvv julianvv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@DataFlex-dev DataFlex-dev merged commit 043f045 into DataFlex-dev:develop Dec 18, 2025
DataFlex-dev added a commit that referenced this pull request Dec 18, 2025
* Update LICENSE

* Fix wrong error code (#3)

* Audience is now Array based (#5)

* Fix wrong error code

* Rewriten audience so that it is based on Array.

* Merge comments

Made it in a way that it still returns a string.

---------

Co-authored-by: DataFlex.dev <127292730+DataFlex-dev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants