authentication

package
v0.0.0-...-46e61fc Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationData

type AuthorizationData struct {
	Token           string                 `json:"token"`
	Type            auth.AuthorizationType `json:"type"`
	WorkspaceID     uuid.UUID              `json:"workspaceID"`
	RepositoryID    uuid.UUID              `json:"repositoryID"`
	AuthzMember     []string               `json:"authzMember"`
	AuthzAdmin      []string               `json:"authzAdmin"`
	AuthzSupervisor []string               `json:"authzSupervisor"`
}

func (*AuthorizationData) SetGroups

func (a *AuthorizationData) SetGroups(authzGroups *AuthzGroups) *AuthorizationData

type AuthzGroups

type AuthzGroups struct {
	AuthzMember     pq.StringArray `json:"authzMember" gorm:"type:text[]"`
	AuthzAdmin      pq.StringArray `json:"authzAdmin" gorm:"type:text[]"`
	AuthzSupervisor pq.StringArray `json:"authzSupervisor" gorm:"type:text[]"`
}

type LoginCredentials

type LoginCredentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

func (*LoginCredentials) CheckInvalidPassword

func (l *LoginCredentials) CheckInvalidPassword(hash string) bool

func (*LoginCredentials) IsInvalidUsernameEmail

func (l *LoginCredentials) IsInvalidUsernameEmail() bool

func (*LoginCredentials) ToBytes

func (l *LoginCredentials) ToBytes() []byte

func (*LoginCredentials) Validate

func (l *LoginCredentials) Validate() error

type LoginResponse

type LoginResponse struct {
	AccountID          uuid.UUID `json:"accountID"`
	AccessToken        string    `json:"accessToken"`
	RefreshToken       string    `json:"refreshToken"`
	Username           string    `json:"username"`
	Email              string    `json:"email"`
	ExpiresAt          time.Time `json:"expiresAt"`
	ExpiresIn          int       `json:"expiresIn"`
	RefreshExpiresIn   int       `json:"refreshExpiresIn"`
	IsApplicationAdmin bool      `json:"isApplicationAdmin"`
}

type Role

type Role struct {
	Role accountEnums.Role `json:"role"`
}

Jump to

Keyboard shortcuts

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