Add auth scope constants

This commit is contained in:
Ben Toogood
2020-05-22 11:37:12 +01:00
parent fbb91c6cb7
commit 9c072a372c
2 changed files with 12 additions and 6 deletions

View File

@@ -7,8 +7,14 @@ import (
"time"
)
// BearerScheme used for Authorization header
const BearerScheme = "Bearer "
const (
// BearerScheme used for Authorization header
BearerScheme = "Bearer "
// ScopePublic is the scope applied to a rule to allow access to the public
ScopePublic = ""
// ScopeAccount is the scope applied to a rule to limit to users with any valid account
ScopeAccount = "*"
)
var (
// ErrInvalidToken is when the token provided is not valid