v1.8.6-rc1 Latest Latest

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 18 Imported by: 28




This section is empty.


This section is empty.


This section is empty.


type Auth

type Auth struct {
	Endpoint            string
	TokenReviewEndpoint string
	SkipCertVerify      bool
	SkipSearch          bool
	// contains filtered or unexported fields

Auth implements HTTP authenticator the required attributes. The attribute Endpoint is the HTTP endpoint to which the POST request should be issued for authentication

func (*Auth) Authenticate

func (a *Auth) Authenticate(m models.AuthModel) (*models.User, error)

Authenticate issues http POST request to Endpoint if it returns 200 the authentication is considered success.

func (*Auth) OnBoardGroup added in v1.8.2

func (a *Auth) OnBoardGroup(u *models.UserGroup, altGroupName string) error

OnBoardGroup create user group entity in Harbor DB, altGroupName is not used.

func (*Auth) OnBoardUser

func (a *Auth) OnBoardUser(u *models.User) error

OnBoardUser delegates to dao pkg to insert/update data in DB.

func (*Auth) PostAuthenticate

func (a *Auth) PostAuthenticate(u *models.User) error

PostAuthenticate generates the user model and on board the user.

func (*Auth) SearchGroup added in v1.8.2

func (a *Auth) SearchGroup(groupKey string) (*models.UserGroup, error)

SearchGroup search group exist in the authentication provider, for HTTP auth, if SkipSearch is true, it assume this group exist in authentication provider.

func (*Auth) SearchUser

func (a *Auth) SearchUser(username string) (*models.User, error)

SearchUser returns nil as authproxy does not have such capability. When SkipSearch is set it always return the default model.


Path Synopsis

Jump to

Keyboard shortcuts

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