auth

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticator

func Authenticator(authf func(AuthInfo) (bool, error)) func(http.Handler) http.Handler

Types

type AuthInfo

type AuthInfo struct {
	// Usernane or email
	Username string
	// Plaintext password or token
	Password string

	// repo component of URL
	// Usually: "username/repo_name"
	// But could also be: "some_repo.git"
	Repo string

	// Are we pushing or fetching ?
	Push  bool
	Fetch bool
}

type BasicAuth

type BasicAuth struct {
	Name string
	Pass string
}

Parse http basic header

type StatusError

type StatusError interface {
	StatusCode() int
}

StatusCode is an interface allowing authenticators to pass down error's with an http error code

Jump to

Keyboard shortcuts

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