container

package
v1.21.7 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(ctx *context.Context)

Authenticate creates a token for the current user If the current user is anonymous, the ghost user is used unless RequireSignInView is enabled.

func DetermineSupport

func DetermineSupport(ctx *context.Context)

DetermineSupport is used to test if the registry supports OCI https://github.com/opencontainers/distribution-spec/blob/main/spec.md#determining-support

func ReqContainerAccess

func ReqContainerAccess(ctx *context.Context)

ReqContainerAccess is a middleware which checks the current user valid (real user or ghost if anonymous access is enabled)

func VerifyImageName

func VerifyImageName(ctx *context.Context)

VerifyImageName is a middleware which checks if the image name is allowed

Types

type Auth

type Auth struct{}

func (*Auth) Name

func (a *Auth) Name() string

func (*Auth) Verify

func (a *Auth) Verify(req *http.Request, w http.ResponseWriter, store auth.DataStore, sess auth.SessionStore) (*user_model.User, error)

Verify extracts the user from the Bearer token If it's an anonymous session a ghost user is returned

Jump to

Keyboard shortcuts

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