Identity: Use typed namespace id (#87121)

* Use typed namespace id
This commit is contained in:
Karl Persson
2024-05-02 14:50:56 +02:00
committed by GitHub
parent 4fd2cb6014
commit d8fbbdefea
12 changed files with 35 additions and 43 deletions
+3 -3
View File
@@ -73,8 +73,8 @@ type Identity struct {
IDToken string
}
func (i *Identity) GetID() string {
return i.ID.String()
func (i *Identity) GetID() NamespaceID {
return i.ID
}
func (i *Identity) GetNamespacedID() (namespace string, identifier string) {
@@ -220,7 +220,7 @@ func (i *Identity) SignedInUser() *user.SignedInUser {
Teams: i.Teams,
Permissions: i.Permissions,
IDToken: i.IDToken,
NamespacedID: i.ID.String(),
NamespacedID: i.ID,
}
if namespace == NamespaceAPIKey {