add context

This commit is contained in:
Livio Amstutz 2019-12-18 16:05:21 +01:00
parent 0731a62833
commit 462b5c83cd
12 changed files with 104 additions and 98 deletions

View file

@ -2,7 +2,6 @@ package oidc
import (
"encoding/json"
"strings"
"time"
"github.com/caos/oidc/pkg/utils"
@ -33,9 +32,9 @@ func (t *IDTokenClaims) UnmarshalJSON(b []byte) error {
return err
}
audience := i.Audiences
if len(audience) == 1 {
audience = strings.Split(audience[0], " ")
}
// if len(audience) == 1 {
// audience = strings.Split(audience[0], " ")
// }
t.Issuer = i.Issuer
t.Subject = i.Subject
t.Audiences = audience