Skip to content

Commit

Permalink
added a general purpose unauthorized error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnabass committed Aug 19, 2024
1 parent 622836a commit fb457ec
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@

package bascule

import "context"
import (
"context"
"errors"
)

var (
// ErrUnauthorized is a general error indicating that a token was unauthorized
// for a particular resource. Most authorizers and approvers should use this
// error or wrap this error to indicate failed authorization.
ErrUnauthorized = errors.New("unauthorized")
)

// AuthorizeEvent represents the result of bascule's authorize workflow.
type AuthorizeEvent[R any] struct {
Expand Down

0 comments on commit fb457ec

Please sign in to comment.