integration

package
v3.10.4-1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package integration contains integration tests for OpenShift Origin.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error added in v0.2.1

func Error(message string, status int, w http.ResponseWriter)

func NewIdentifyingHandler added in v0.2.1

func NewIdentifyingHandler() http.Handler

func NewXRemoteUserProxyingHandler added in v0.2.1

func NewXRemoteUserProxyingHandler(rawURL string) http.Handler

Types

type BasicAuthChallenger added in v0.2.1

type BasicAuthChallenger struct {
	// contains filtered or unexported fields
}

func NewBasicAuthChallenger added in v0.2.1

func NewBasicAuthChallenger(realm string, users []User, authenticatedHandler http.Handler) BasicAuthChallenger

NewBasicAuthChallenger provides a simple basic auth server that is compatible with our basic auth password validator

Example
challenger := NewBasicAuthChallenger("realm", []User{{"username", "password", "Brave Butcher", "cowardly_butcher@example.org"}}, NewIdentifyingHandler())
http.Handle("/", challenger)
log.Printf("Auth server listening on http://localhost:1234")
log.Fatal(http.ListenAndServe(":1234", nil))
Output:

func (*BasicAuthChallenger) Challenge added in v0.2.1

func (challenger *BasicAuthChallenger) Challenge(w http.ResponseWriter)

func (BasicAuthChallenger) ServeHTTP added in v0.2.1

func (challenger BasicAuthChallenger) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*BasicAuthChallenger) Validate added in v0.2.1

func (challenger *BasicAuthChallenger) Validate(username, password string) bool

type User added in v0.2.1

type User struct {
	ID       string
	Password string
	Name     string
	Email    string
}

Directories

Path Synopsis
Package testing contains types for tests.
Package testing contains types for tests.

Jump to

Keyboard shortcuts

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