auth

package
v0.0.0-...-8aba971 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(backendRepo repository.BackendRepository, workspaceRepo repository.WorkspaceRepository) echo.MiddlewareFunc

func WithAssumedStubAuth

func WithAssumedStubAuth(next func(ctx echo.Context) error, isPublic func(stubId string) (*types.Workspace, error)) func(ctx echo.Context) error

func WithAuth

func WithAuth(next func(ctx echo.Context) error) func(ctx echo.Context) error

func WithClusterAdminAuth

func WithClusterAdminAuth(next func(ctx echo.Context) error) func(ctx echo.Context) error

func WithWorkspaceAuth

func WithWorkspaceAuth(next func(ctx echo.Context) error) func(ctx echo.Context) error

Types

type AuthInfo

type AuthInfo struct {
	Workspace *types.Workspace
	Token     *types.Token
}

func AuthInfoFromContext

func AuthInfoFromContext(ctx context.Context) (*AuthInfo, bool)

type AuthInterceptor

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

func NewAuthInterceptor

func NewAuthInterceptor(backendRepo repository.BackendRepository, workspaceRepo repository.WorkspaceRepository) *AuthInterceptor

func (*AuthInterceptor) Stream

func (*AuthInterceptor) Unary

type HttpAuthContext

type HttpAuthContext struct {
	echo.Context
	AuthInfo *AuthInfo
}

type Signature

type Signature struct {
	Key       string
	Timestamp int64
}

func SignPayload

func SignPayload(payload []byte, secretKey string) Signature

Jump to

Keyboard shortcuts

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