auth

package
v0.0.0-...-692b2d1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 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 DeepCodeTokenMiddleware

func DeepCodeTokenMiddleware(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
	DeepCode      *model.DeepCode
	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