container

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 30 Imported by: 0

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

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 for anonymous access)

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