Skip to content

Commit

Permalink
!
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Jan 7, 2025
1 parent 18ee324 commit 8a35bcc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ public V1ClientGrantController(IKubernetesClient kube, EntityRequeue<V1ClientGra
protected override async Task<string> CreateApi(IManagementApiClient api, ClientGrantConf conf, string defaultNamespace, CancellationToken cancellationToken)
{
var req = new ClientGrantCreateRequest();
req.AllowAnyOrganization = conf.AllowAnyOrganization;
req.OrganizationUsage = Convert(conf.OrganizationUsage);
req.Scope = conf.Scopes?.ToList();
req.ClientId = await ResolveClientRefToId(api, conf.ClientRef, defaultNamespace, cancellationToken);
req.Audience = await ResolveResourceServerRefToIdentifier(api, conf.Audience, defaultNamespace, cancellationToken);
req.Scope = conf.Scope?.ToList();
req.AllowAnyOrganization = conf.AllowAnyOrganization;
req.OrganizationUsage = Convert(conf.OrganizationUsage);

var self = await api.ClientGrants.CreateAsync(req, cancellationToken);
if (self is null)
Expand All @@ -113,9 +113,9 @@ protected override async Task<string> CreateApi(IManagementApiClient api, Client
protected override async Task UpdateApi(IManagementApiClient api, string id, ClientGrantConf conf, string defaultNamespace, CancellationToken cancellationToken)
{
var req = new ClientGrantUpdateRequest();
req.Scope = conf.Scope?.ToList();
req.AllowAnyOrganization = conf.AllowAnyOrganization;
req.OrganizationUsage = Convert(conf.OrganizationUsage);
req.Scope = conf.Scopes?.ToList();

await api.ClientGrants.UpdateAsync(id, req, cancellationToken);
}
Expand Down

0 comments on commit 8a35bcc

Please sign in to comment.