auth

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidToken = httperror.Error{Message: "invalid token"}

Functions

func DeepSourceTokenMiddleware

func DeepSourceTokenMiddleware(runnerID string, verifier *jwtutil.Verifier) echo.MiddlewareFunc

Types

type Facade

type Facade struct {
	TokenHandlers     *token.Handler
	OAuthHandlers     *oauth.Handler
	SAMLHandlers      *saml.Handler
	TokenMiddleware   echo.MiddlewareFunc
	SessionMiddleware echo.MiddlewareFunc
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, opts *Opts, client *http.Client) (*Facade, error)

func (*Facade) AddRoutes

func (f *Facade) AddRoutes(r Router) Router

type Opts

type Opts struct {
	Runner        *model.Runner
	DeepSource    *model.DeepSource
	Apps          map[string]*oauth.App
	SAML          *saml.Opts
	Store         store.Store
	AllowedOrigin string // For CORS
}

type Router

type Router interface {
	AddRoute(method string, path string, handlerFunc echo.HandlerFunc, middleware ...echo.MiddlewareFunc)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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