mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-12 09:05:12 +00:00
fix: re-apply register Passkey API v2 (#5990)
Revert "fix: REVERT register Passkey API v2"
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package authz
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/errors"
|
||||
)
|
||||
|
||||
// UserIDInCTX checks if the userID
|
||||
// equals the authenticated user in the context.
|
||||
func UserIDInCTX(ctx context.Context, userID string) error {
|
||||
if GetCtxData(ctx).UserID != userID {
|
||||
return errors.ThrowUnauthenticated(nil, "AUTH-Bohd2", "Errors.User.UserIDWrong")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user