package identifier
import "github.com/open-policy-agent/opa/server/identifier"
Package identifier provides handlers for associating an identity with incoming requests.
Index ¶
- func Identity(r *http.Request) (string, bool)
- func SetIdentity(r *http.Request, v string) *http.Request
- type TokenBased
Functions ¶
func Identity ¶
Identity returns the identity of the caller associated with ctx.
func SetIdentity ¶
SetIdentity returns a new http.Request with the identity set to v.
Types ¶
type TokenBased ¶
type TokenBased struct {
// contains filtered or unexported fields
}
TokenBased extracts Bearer tokens from the request.
func NewTokenBased ¶
func NewTokenBased(inner http.Handler) *TokenBased
NewTokenBased returns a new TokenBased object.
func (*TokenBased) ServeHTTP ¶
func (h *TokenBased) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files ¶
- Version
- v0.10.2
- Published
- Dec 10, 2018
- Platform
- js/wasm
- Imports
- 3 packages
- Last checked
- 2 minutes ago –
Tools for package owners.