Drop any query string from the admin tokens

This commit makes sure the admin token audience is passed without
a query string (or any fragment).
pull/901/head
Mariano Cano 2 years ago
parent 50a271edca
commit 4770b405ba

@ -90,6 +90,13 @@ func (c *AdminClient) generateAdminToken(aud *url.URL) (string, error) {
return "", err
}
// Drop any query string parameter from the token audience
aud = &url.URL{
Scheme: aud.Scheme,
Host: aud.Host,
Path: aud.Path,
}
now := time.Now()
tokOptions := []token.Options{
token.WithJWTID(jwtID),

Loading…
Cancel
Save