uaa

package
v0.0.0-...-e417875 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 13 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	sync.Mutex

	auth.DefaultAuthenticateHelper
	// contains filtered or unexported fields
}

Auth is the implementation of AuthenticateHelper to access uaa for authentication.

func (*Auth) Authenticate

func (u *Auth) Authenticate(ctx context.Context, m models.AuthModel) (*models.User, error)

Authenticate ...

func (*Auth) OnBoardUser

func (u *Auth) OnBoardUser(ctx context.Context, user *models.User) error

OnBoardUser will check if a user exists in user table, if not insert the user and put the id in the pointer of user model, if it does exist, return the user's profile.

func (*Auth) PostAuthenticate

func (u *Auth) PostAuthenticate(ctx context.Context, user *models.User) error

PostAuthenticate will check if user exists in DB, if not on Board user, if he does, update the profile.

func (*Auth) SearchUser

func (u *Auth) SearchUser(ctx context.Context, username string) (*models.User, error)

SearchUser search user on uaa server, transform it to Harbor's user model

Jump to

Keyboard shortcuts

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