

ensureScope ∷ MonadThrow μ ⇒ JWT VerifiedJWT → ([Text] → Bool) → μ ()
ensureScope token p = guardBool errWrongAuthScope 
errWrongAuthScope ∷ ServantErr
errWrongAuthScope = errText err401 "Your access token is not authorized for this action."
errWrongAuthScope = errText err401 "Your access token is not authorized for this action."