identifier

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package identifier provides handlers for associating an identity with incoming requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Identity

func Identity(r *http.Request) string

Identity returns the identity of the caller associated with ctx.

func SetIdentity

func SetIdentity(r *http.Request, v string) *http.Request

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL