Browse Source

Remove audience from JWT token to avoid issue between string and string array

master
harture 7 years ago
parent
commit
6458bc7fc8
  1. 6
      keycloak_client.go

6
keycloak_client.go

@ -387,13 +387,13 @@ func str(s string) *string {
}
// Token is JWT token and the custom fields present in OIDC Token provided by Keycloak.
// We need to define our own structure as the library define aud as a string instead of a string array.
// Token is JWT token.
// We need to define our own structure as the library define aud as a string but it can also be a string array.
// To fix this issue, we remove aud as we do not use it here.
type Token struct {
hdr *header
Issuer string `json:"iss,omitempty"`
Subject string `json:"sub,omitempty"`
Audience []string `json:"aud,omitempty"`
ExpirationTime int64 `json:"exp,omitempty"`
NotBefore int64 `json:"nbf,omitempty"`
IssuedAt int64 `json:"iat,omitempty"`

Loading…
Cancel
Save