Include audience in client credential token requests
@@ -358,6 +358,7 @@ func (rsc *RedSkyConfig) tokenSource(ctx context.Context) (oauth2.TokenSource, e
ClientID: az.Credential.ClientID,
ClientSecret: az.Credential.ClientSecret,
TokenURL: srv.Authorization.TokenEndpoint,
+ EndpointParams: url.Values{"audience": []string{srv.Identifier}},
AuthStyle: oauth2.AuthStyleInParams,
}
return cc.TokenSource(ctx), nil
