Documentation
¶
Index ¶
- Constants
- Variables
- func AddToContext(ctx context.Context, token *dynoid.Token, err error) context.Context
- func Authorize(audience string, callback dynoid.IssuerCallback) func(http.Handler) http.Handler
- func AuthorizeSameSpace(audience string) func(http.Handler) http.Handler
- func AuthorizeSpaces(audience, host string, spaces ...string) func(http.Handler) http.Handler
- func FromContext(ctx context.Context) (*dynoid.Token, error)
- func Populate(audience string, callback dynoid.IssuerCallback) func(http.Handler) http.Handler
Constants ¶
View Source
const ( DynoIDKey ctxKeyDynoID = iota DynoIDErrKey )
Variables ¶
View Source
var (
ErrTokenMissing = errors.New("token not found")
)
Functions ¶
func AddToContext ¶
AddToContext adds the Token to the given context
func AuthorizeSameSpace ¶
AuthorizeSameSpace restricts access to tokens from the same space/issuer for the given audience.
func AuthorizeSpaces ¶
AuthorizeSpace populates the dyno identity and blocks any requests that aren't from one of the given spaces.
func FromContext ¶
FromContext fetches the Token from the context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.