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 ¶
- func UiServerPathRewrite() echo.MiddlewareFunc
- type Auth
- type AuthOption
- func AuthWithSessionStore(sessions *sessions.SessionStore) AuthOption
- func InjectBearerToken() AuthOption
- func InjectInHeader(headerKey string) AuthOption
- func WithProviderID(providerID string) AuthOption
- func WithTokenInjector(injector TokenInjector) AuthOption
- func WithTokenType(tokenType models.OauthTokenType) AuthOption
- type Revproxy
- type RevproxyOption
- type TokenInjector
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 ¶
Click to show internal directories.
Click to hide internal directories.