package http
import "k8s.io/kubernetes/Godeps/_workspace/src/github.com/coreos/go-oidc/http"
Index ¶
- func BasicAuth(r *http.Request) (username, password string, ok bool)
- func Cacheable(hdr http.Header) (time.Duration, bool, error)
- func CopyRequest(r *http.Request) *http.Request
- func MergeQuery(u url.URL, q url.Values) url.URL
- func NewResourceLocation(reqURL *url.URL, id string) string
- func ParseNonEmptyURL(u string) (*url.URL, error)
- func WriteError(w http.ResponseWriter, code int, msg string)
- type Client
- type HandlerClient
- type LoggingMiddleware
- type RequestRecorder
Functions ¶
func BasicAuth ¶
BasicAuth parses a username and password from the request's Authorization header. This was pulled from golang master: https://codereview.appspot.com/76540043
func Cacheable ¶
func CopyRequest ¶
CopyRequest returns a clone of the provided *http.Request. The returned object is a shallow copy of the struct and a deep copy of its Header field.
func MergeQuery ¶
MergeQuery appends additional query values to an existing URL.
func NewResourceLocation ¶
NewResourceLocation appends a resource id to the end of the requested URL path.
func ParseNonEmptyURL ¶
ParseNonEmptyURL checks that a string is a parsable URL which is also not empty since `url.Parse("")` does not return an error. Must contian a scheme and a host.
func WriteError ¶
func WriteError(w http.ResponseWriter, code int, msg string)
Types ¶
type Client ¶
type HandlerClient ¶
func (*HandlerClient) Do ¶
type LoggingMiddleware ¶
func (*LoggingMiddleware) ServeHTTP ¶
func (l *LoggingMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RequestRecorder ¶
func (*RequestRecorder) Do ¶
func (*RequestRecorder) RoundTrip ¶
Source Files ¶
client.go http.go middleware.go url.go
- Version
- v1.1.5
- Published
- Jan 23, 2016
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 6 minutes ago –
Tools for package owners.