mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-06 19:36:41 +00:00
feat: add apis and application keys (#1327)
* feat: add apis and application keys * VerifyOIDCClientSecret * Update internal/v2/repository/project/api_config.go Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> * Update internal/v2/repository/project/key.go Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com> * fix append ApplicationKeyWriteModel Co-authored-by: Fabi <38692350+fgerschwiler@users.noreply.github.com>
This commit is contained in:
@@ -227,10 +227,6 @@ func (repo *ProjectRepo) ApplicationByID(ctx context.Context, projectID, appID s
|
||||
return model.ApplicationViewToModel(app), nil
|
||||
}
|
||||
|
||||
func (repo *ProjectRepo) AddApplication(ctx context.Context, app *proj_model.Application) (*proj_model.Application, error) {
|
||||
return repo.ProjectEvents.AddApplication(ctx, app)
|
||||
}
|
||||
|
||||
func (repo *ProjectRepo) SearchApplications(ctx context.Context, request *proj_model.ApplicationSearchRequest) (*proj_model.ApplicationSearchResponse, error) {
|
||||
request.EnsureLimit(repo.SearchLimit)
|
||||
sequence, sequenceErr := repo.View.GetLatestApplicationSequence()
|
||||
@@ -322,22 +318,6 @@ func (repo *ProjectRepo) GetClientKey(ctx context.Context, projectID, applicatio
|
||||
return key_view_model.AuthNKeyToModel(key), nil
|
||||
}
|
||||
|
||||
func (repo *ProjectRepo) AddClientKey(ctx context.Context, key *proj_model.ClientKey) (*proj_model.ClientKey, error) {
|
||||
return repo.ProjectEvents.AddClientKey(ctx, key)
|
||||
}
|
||||
|
||||
func (repo *ProjectRepo) RemoveClientKey(ctx context.Context, projectID, applicationID, keyID string) error {
|
||||
return repo.ProjectEvents.RemoveApplicationKey(ctx, projectID, applicationID, keyID)
|
||||
}
|
||||
|
||||
func (repo *ProjectRepo) ChangeAPIConfig(ctx context.Context, config *proj_model.APIConfig) (*proj_model.APIConfig, error) {
|
||||
return repo.ProjectEvents.ChangeAPIConfig(ctx, config)
|
||||
}
|
||||
|
||||
func (repo *ProjectRepo) ChangeAPIConfigSecret(ctx context.Context, projectID, appID string) (*proj_model.APIConfig, error) {
|
||||
return repo.ProjectEvents.ChangeAPIConfigSecret(ctx, projectID, appID)
|
||||
}
|
||||
|
||||
func (repo *ProjectRepo) ProjectGrantByID(ctx context.Context, grantID string) (*proj_model.ProjectGrantView, error) {
|
||||
grant, err := repo.View.ProjectGrantByID(grantID)
|
||||
if err != nil {
|
||||
|
||||
@@ -24,9 +24,6 @@ type ProjectRepository interface {
|
||||
ProjectChanges(ctx context.Context, id string, lastSequence uint64, limit uint64, sortAscending bool) (*model.ProjectChanges, error)
|
||||
|
||||
ApplicationByID(ctx context.Context, projectID, appID string) (*model.ApplicationView, error)
|
||||
AddApplication(ctx context.Context, app *model.Application) (*model.Application, error)
|
||||
ChangeAPIConfig(ctx context.Context, config *model.APIConfig) (*model.APIConfig, error)
|
||||
ChangeAPIConfigSecret(ctx context.Context, projectID, appID string) (*model.APIConfig, error)
|
||||
SearchApplications(ctx context.Context, request *model.ApplicationSearchRequest) (*model.ApplicationSearchResponse, error)
|
||||
ApplicationChanges(ctx context.Context, id string, secId string, lastSequence uint64, limit uint64, sortAscending bool) (*model.ApplicationChanges, error)
|
||||
SearchClientKeys(ctx context.Context, request *key_model.AuthNKeySearchRequest) (*key_model.AuthNKeySearchResponse, error)
|
||||
|
||||
Reference in New Issue
Block a user