mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-13 09:25:12 +00:00
feat(api): allow filtering apps by client id and entity id (#11385)
# Which Problems Are Solved There's currently no way to retrieve a project based on the client_id of an application. A developer would need to iterate through all projects and their applications to make the correlation. # How the Problems Are Solved - Added a possibility to filter for `client_id` and `entity_id` on the ListApplications endpoint. - Added the `project_id` on the `Application` response (used on the ListApplications endpoint). # Additional Changes None # Additional Context - closes #11340 - requires backport to v4.x
This commit is contained in:
@@ -80,8 +80,9 @@ func samlMetadataGen(entityID string) []byte {
|
||||
return []byte(str)
|
||||
}
|
||||
|
||||
func createSAMLAppWithName(t *testing.T, baseURI, projectID string) ([]byte, *application.CreateApplicationResponse, string) {
|
||||
samlMetas := samlMetadataGen(integration.URL())
|
||||
func createSAMLAppWithName(t *testing.T, baseURI, projectID string) ([]byte, *application.CreateApplicationResponse, string, string) {
|
||||
entityID := integration.URL()
|
||||
samlMetas := samlMetadataGen(entityID)
|
||||
appName := integration.ApplicationName()
|
||||
|
||||
appForSAMLConfigChange, appSAMLConfigChangeErr := instance.Client.ApplicationV2.CreateApplication(IAMOwnerCtx, &application.CreateApplicationRequest{
|
||||
@@ -104,11 +105,11 @@ func createSAMLAppWithName(t *testing.T, baseURI, projectID string) ([]byte, *ap
|
||||
})
|
||||
require.Nil(t, appSAMLConfigChangeErr)
|
||||
|
||||
return samlMetas, appForSAMLConfigChange, appName
|
||||
return samlMetas, appForSAMLConfigChange, appName, entityID
|
||||
}
|
||||
|
||||
func createSAMLApp(t *testing.T, baseURI, projectID string) ([]byte, *application.CreateApplicationResponse) {
|
||||
metas, app, _ := createSAMLAppWithName(t, baseURI, projectID)
|
||||
metas, app, _, _ := createSAMLAppWithName(t, baseURI, projectID)
|
||||
return metas, app
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user