Use `hash` function for checking authorization too