Authn: move namespace id type (#86853)

* Use RoleType from org package

* Move to identity package and re-export from authn

* Replace usage of top level functions for identity

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
This commit is contained in:
Karl Persson
2024-04-25 12:54:36 +02:00
committed by GitHub
co-authored by Misi
parent ed89354eaa
commit cd724d74aa
16 changed files with 170 additions and 155 deletions
+2 -2
View File
@@ -298,7 +298,7 @@ func TestAPIKey_ResolveIdentity(t *testing.T) {
{
desc: "should return error for invalid namespace",
namespaceID: authn.MustParseNamespaceID("user:1"),
expectedErr: authn.ErrInvalidNamepsaceID,
expectedErr: authn.ErrInvalidNamespaceID,
},
{
desc: "should return error when api key has expired",
@@ -328,7 +328,7 @@ func TestAPIKey_ResolveIdentity(t *testing.T) {
OrgID: 1,
ServiceAccountId: intPtr(1),
},
expectedErr: authn.ErrInvalidNamepsaceID,
expectedErr: authn.ErrInvalidNamespaceID,
},
{
desc: "should return error when api key is belongs to different org",