revproxy

package
v0.0.0-...-0db91f5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package revproxy contains the definition of all routes, proxying and authentication performed by the reverse proxy that is part of the Renku gateway.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UiServerPathRewrite

func UiServerPathRewrite() echo.MiddlewareFunc

uiServerPathRewrite changes the incoming requests so that the UI server is used (as a second proxy) only for very specific endpoints (when absolutely necessary). For all other cases the gateway routes directly to the required Renku component and injects the proper credentials required by the specific component.

Types

type Auth

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

Auth generates middleware that will inject tokens in the proxied http requests

func NewAuth

func NewAuth(options ...AuthOption) (Auth, error)

func (*Auth) Middleware

func (a *Auth) Middleware() echo.MiddlewareFunc

type AuthOption

type AuthOption func(*Auth)

func AuthWithSessionStore

func AuthWithSessionStore(sessions *sessions.SessionStore) AuthOption

func InjectBearerToken

func InjectBearerToken() AuthOption

func InjectInHeader

func InjectInHeader(headerKey string) AuthOption

func WithProviderID

func WithProviderID(providerID string) AuthOption

func WithTokenInjector

func WithTokenInjector(injector TokenInjector) AuthOption

func WithTokenType

func WithTokenType(tokenType models.OauthTokenType) AuthOption

type Revproxy

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

func NewServer

func NewServer(options ...RevproxyOption) (*Revproxy, error)

func (*Revproxy) RegisterHandlers

func (r *Revproxy) RegisterHandlers(e *echo.Echo, commonMiddlewares ...echo.MiddlewareFunc)

type RevproxyOption

type RevproxyOption func(*Revproxy)

func WithConfig

func WithConfig(revproxyConfig config.RevproxyConfig) RevproxyOption

func WithSessionStore

func WithSessionStore(sessions *sessions.SessionStore) RevproxyOption

type TokenInjector

type TokenInjector func(c echo.Context, token models.AuthToken) error

Jump to

Keyboard shortcuts

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