Documentation
¶
Index ¶
- Variables
- func AuthFunc(endpoint string, opts ...Option) grpc_auth.AuthFunc
- func EndpointFromDiscovery(iss string) (string, error)
- func Introspection(endpoint string, opts ...Option) func(http.Handler) http.Handler
- func Must(v string, err error) string
- type Cache
- type Option
- type Options
- type Result
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoBearer is returned by FromContext function when no Bearer token was present ErrNoBearer = errors.New("no bearer") // ErrNoMiddleware is returned by FromContext when no value was set. It is due to the middleware not being called before this function. ErrNoMiddleware = errors.New("introspection middleware didn't execute") )
Functions ¶
func EndpointFromDiscovery ¶
EndpointFromDiscovery is helper function to get the introspection endpoint from the openid issuer/authority
func Introspection ¶
Introspection ...
Types ¶
type Cache ¶
type Cache interface { // Get gets the Result object associated with the key Get(key string) *Result // Store is used to store an introspection result associated with the key set to expire in specified duration Store(key string, res *Result, exp time.Duration) }
Cache is used to store the introspection result
func NewInMemoryCache ¶
func NewInMemoryCache() Cache
NewInMemoryCache returns an in memory implementation of the Cache. Useful for testing and single instance apps.
Click to show internal directories.
Click to hide internal directories.