Chore: Cleanup namespace and ID resolution (#79360)
* Chore: Cleanup namespace ID resolution * Check for negative userID when relevant * Reuse existing function for parsing ID as int * Fix imports
This commit is contained in:
@@ -40,7 +40,7 @@ type OAuthTokenSync struct {
|
||||
}
|
||||
|
||||
func (s *OAuthTokenSync) SyncOauthTokenHook(ctx context.Context, identity *authn.Identity, _ *authn.Request) error {
|
||||
namespace, _ := identity.NamespacedID()
|
||||
namespace, _ := identity.GetNamespacedID()
|
||||
// only perform oauth token check if identity is a user
|
||||
if namespace != authn.NamespaceUser {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user