mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:07:30 +00:00
feat: App Keys API v2 (#10140)
# Which Problems Are Solved This PR *partially* addresses #9450 . Specifically, it implements the resource based API for app keys. This PR, together with https://github.com/zitadel/zitadel/pull/10077 completes #9450 . # How the Problems Are Solved - Implementation of the following endpoints: `CreateApplicationKey`, `DeleteApplicationKey`, `GetApplicationKey`, `ListApplicationKeys` - `ListApplicationKeys` can filter by project, app or organization ID. Sorting is also possible according to some criteria. - All endpoints use permissions V2 # TODO - [x] Deprecate old endpoints # Additional Context Closes #9450
This commit is contained in:
@@ -26,6 +26,7 @@ var (
|
||||
` projections.authn_keys2.sequence,` +
|
||||
` projections.authn_keys2.expiration,` +
|
||||
` projections.authn_keys2.type,` +
|
||||
` projections.authn_keys2.object_id,` +
|
||||
` COUNT(*) OVER ()` +
|
||||
` FROM projections.authn_keys2`
|
||||
prepareAuthNKeysCols = []string{
|
||||
@@ -37,6 +38,7 @@ var (
|
||||
"sequence",
|
||||
"expiration",
|
||||
"type",
|
||||
"object_id",
|
||||
"count",
|
||||
}
|
||||
|
||||
@@ -129,6 +131,7 @@ func Test_AuthNKeyPrepares(t *testing.T) {
|
||||
uint64(20211109),
|
||||
testNow,
|
||||
1,
|
||||
"app1",
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -147,6 +150,7 @@ func Test_AuthNKeyPrepares(t *testing.T) {
|
||||
Sequence: 20211109,
|
||||
Expiration: testNow,
|
||||
Type: domain.AuthNKeyTypeJSON,
|
||||
ApplicationID: "app1",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -168,6 +172,7 @@ func Test_AuthNKeyPrepares(t *testing.T) {
|
||||
uint64(20211109),
|
||||
testNow,
|
||||
1,
|
||||
"app1",
|
||||
},
|
||||
{
|
||||
"id-2",
|
||||
@@ -178,6 +183,7 @@ func Test_AuthNKeyPrepares(t *testing.T) {
|
||||
uint64(20211109),
|
||||
testNow,
|
||||
1,
|
||||
"app1",
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -196,6 +202,7 @@ func Test_AuthNKeyPrepares(t *testing.T) {
|
||||
Sequence: 20211109,
|
||||
Expiration: testNow,
|
||||
Type: domain.AuthNKeyTypeJSON,
|
||||
ApplicationID: "app1",
|
||||
},
|
||||
{
|
||||
ID: "id-2",
|
||||
@@ -206,6 +213,7 @@ func Test_AuthNKeyPrepares(t *testing.T) {
|
||||
Sequence: 20211109,
|
||||
Expiration: testNow,
|
||||
Type: domain.AuthNKeyTypeJSON,
|
||||
ApplicationID: "app1",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user