Skip to content

AuthenticateWithClaims doesn't respect UnmarshalJSON implementers #174

Description

@jhwz

In sessions.AuthenticateWithClaims you use mapstructure to decode the custom claims into the object.

The call you are using doesn't respect a type implementing the json.Unmarshaler interface. Ideally you would use the standard json library for this, but I understand that it's difficult to implement (may need to unmarshal twice or something). The alternative is to add a DecodeHook to your mapstructure config which handles types which implement json.Unmarshaler

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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