authhandler

package
v0.0.0-...-b5d0d35 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = false
View Source
var DefaultConfigFilename = "/etc/openidc_config.yml"

Functions

func Handle

func Handle(pattern string, handler http.Handler)

func HandleFunc

func HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

Types

type AppConfigFile

type AppConfigFile struct {
	Openidc OidcConfig
}

type OidcConfig

type OidcConfig struct {
	ClientID     string
	ClientSecret string
	ProviderURL  string
}

var DefaultConfigFilename = "config.yml" var defaultOIDCAuth *SimpleOIDCAuth var defaultContext context.Context

type SimpleOIDCAuth

type SimpleOIDCAuth struct {
	ClientID     string
	ClientSecret string
	ProviderURL  string
	// contains filtered or unexported fields
}

func NewSimpleOIDCAuth

func NewSimpleOIDCAuth(ctx *context.Context, clientID string, clientSecret string, providerURL string) *SimpleOIDCAuth

func NewSimpleOIDCAuthFromConfig

func NewSimpleOIDCAuthFromConfig(configFilename *string, ctx *context.Context) (*SimpleOIDCAuth, error)

func (*SimpleOIDCAuth) GetRemoteUserInfo

func (state *SimpleOIDCAuth) GetRemoteUserInfo(r *http.Request) (*UserInfo, error)

Returns the remote username associated with the request or empty string if The user is not found

func (*SimpleOIDCAuth) Handle

func (state *SimpleOIDCAuth) Handle(pattern string, handler http.Handler)

func (*SimpleOIDCAuth) HandleFunc

func (state *SimpleOIDCAuth) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))

func (*SimpleOIDCAuth) Handler

func (state *SimpleOIDCAuth) Handler(h http.Handler) http.Handler

type UserInfo

type UserInfo struct {
	Id       string
	Username *string
	Domain   *string
}

func GetRemoteUserInfo

func GetRemoteUserInfo(r *http.Request) (*UserInfo, error)

Jump to

Keyboard shortcuts

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