Skip to content
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

fix/refactor(broker): Fix JSON generation of returned authentication data (userinfo and message) #43

Merged
merged 2 commits into from
Jul 3, 2024

Commits on Jul 3, 2024

  1. Turn userInfo into own type and refactor FetchUserInfo

    To prepare for the json marshaling changes, we need to turn the userInfo
    into its own type and add json annotations to the struct so that it can
    be marshaled correctly through json.Marshal.
    denisonbarbosa committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    e5b7f66 View commit details
    Browse the repository at this point in the history
  2. Refactor IsAuthenticated logic to ensure valid JSON return

    We had some problems when error messages had double quotes in them, as
    it would break the JSON unmarshaling. To avoid this kind of errors
    again, we now use separate types for the returned data and marshal them
    through json.Marshal, which prevents mistakes that could happen when
    "manually" generating the message.
    denisonbarbosa committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    0a6045e View commit details
    Browse the repository at this point in the history