-
Notifications
You must be signed in to change notification settings - Fork 1
Audience is now Array based #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audience is now Array based #5
Conversation
julianvv
left a comment
There was a problem hiding this 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.
DAE-RobinHazewinkel
left a comment
There was a problem hiding this 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.
julianvv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* 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>
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.