2022-02-11 12:25:05 +00:00
|
|
|
package v2
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
)
|
|
|
|
|
2022-11-10 17:46:52 +00:00
|
|
|
const invalidRequestMessage = "malformed request"
|
|
|
|
|
|
|
|
func malformedRequestError(reason string) error {
|
|
|
|
return fmt.Errorf("%s: %s", invalidRequestMessage, reason)
|
|
|
|
}
|
|
|
|
|
2022-02-11 12:25:05 +00:00
|
|
|
var (
|
2022-11-10 17:46:52 +00:00
|
|
|
errEmptyBody = malformedRequestError("empty body")
|
|
|
|
errEmptyVerificationHeader = malformedRequestError("empty verification header")
|
|
|
|
errEmptyBodySig = malformedRequestError("empty at body signature")
|
|
|
|
errInvalidSessionSig = malformedRequestError("invalid session token signature")
|
|
|
|
errInvalidSessionOwner = malformedRequestError("invalid session token owner")
|
|
|
|
errInvalidVerb = malformedRequestError("session token verb is invalid")
|
2022-02-11 12:25:05 +00:00
|
|
|
)
|