Skip to content

Commit

Permalink
fix: allow for using auth header (#67)
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
  • Loading branch information
davidspek committed Jul 11, 2023
1 parent eab0220 commit 0e03d18
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 1,243 deletions.
18 changes: 9 additions & 9 deletions clients/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func (c *ClientWrapper) MutateGroup(ctx context.Context, name string, members []

return &model.Group{
Name: name,
Organization: &model.Organization{
Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
},
// Organization: &model.Organization{
// Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
// },
}, nil
}

Expand Down Expand Up @@ -324,9 +324,9 @@ func (c *ClientWrapper) GetGroupFromName(ctx context.Context, groupName string)

return &model.Group{
Name: groupName,
Organization: &model.Organization{
Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
},
// Organization: &model.Organization{
// Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
// },
}, nil
}

Expand Down Expand Up @@ -439,8 +439,8 @@ func (c *ClientWrapper) DeleteGroup(ctx context.Context, groupName string) (*mod
log.Info("Success deleting group in keto")
return &model.Group{
Name: groupName,
Organization: &model.Organization{
Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
},
// Organization: &model.Organization{
// Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
// },
}, nil
}
12 changes: 6 additions & 6 deletions clients/oauth2client.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ func (c *ClientWrapper) CreateOAuth2Client(ctx context.Context, mode HydraOperat

output := format.HydraOAuth2ClientToGraphQL(*createdClient)

output.Organization = &model.Organization{
Name: "main", //TODO: decide whether to hardcode this or not
}
// output.Organization = &model.Organization{
// Name: "main", //TODO: decide whether to hardcode this or not
// }

return output, nil
}
Expand Down Expand Up @@ -300,9 +300,9 @@ func (c *ClientWrapper) DeleteOAuth2Client(ctx context.Context, clientID string)

return &model.OAuth2Client{
ClientID: px.Ptr(clientID),
Organization: &model.Organization{
Name: "main", //TODO: decide whether to hardcode this or not
},
// Organization: &model.Organization{
// Name: "main", //TODO: decide whether to hardcode this or not
// },
}, nil
}

Expand Down
6 changes: 3 additions & 3 deletions clients/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ func (c *ClientWrapper) DeleteUser(ctx context.Context, id string) (*model.User,
return &model.User{
ID: id,
Email: "deleted",
Organization: &model.Organization{
Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
},
// Organization: &model.Organization{
// Name: consts.MainOrganizationName, //TODO: decide whether to hardcode this or not
// },
}, nil
}

Expand Down
922 changes: 0 additions & 922 deletions generated/client/client.go

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions generated/client/models_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ require (
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.42.0
go.opentelemetry.io/contrib/propagators/jaeger v1.17.0
go.opentelemetry.io/otel v1.16.0
go.opentelemetry.io/otel/exporters/jaeger v1.16.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.16.0
go.opentelemetry.io/otel/sdk v1.16.0
go.opentelemetry.io/otel/trace v1.16.0
sigs.k8s.io/controller-runtime v0.14.4
Expand Down
Loading

0 comments on commit 0e03d18

Please sign in to comment.