sso

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientID           = "clientID"
	ClientSecret       = "clientSecret"
	LdapBindPW         = "bindPW"
	LdapUsernamePrompt = "usernamePrompt"
	LDAP               = "LDAP"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Id     string                 `json:"id"`
	Type   string                 `json:"type"`
	Name   string                 `json:"name"`
	Config map[string]interface{} `json:"config"`
}

func (*Config) IsSsoLdap added in v0.7.0

func (r *Config) IsSsoLdap() bool

type SSOLoginModel

type SSOLoginModel struct {
	TableName struct{} `sql:"sso_login_config"`
	Id        int32    `sql:"id,pk"`
	Name      string   `sql:"name,notnull"`
	Label     string   `sql:"label"`
	Url       string   `sql:"url"`
	Config    string   `sql:"config"`
	Active    bool     `sql:"active,notnull"`
	sql.AuditLog
}

type SSOLoginRepository

type SSOLoginRepository interface {
	Create(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)
	Update(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)
	GetById(id int32) (*SSOLoginModel, error)
	GetAll() ([]SSOLoginModel, error)
	GetActive() (*SSOLoginModel, error)
	Delete(userModel *SSOLoginModel, tx *pg.Tx) (bool, error)
	GetByName(name string) (*SSOLoginModel, error)

	GetConnection() (dbConnection *pg.DB)
}

type SSOLoginRepositoryImpl

type SSOLoginRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewSSOLoginRepositoryImpl

func NewSSOLoginRepositoryImpl(dbConnection *pg.DB,
	logger *zap.SugaredLogger) *SSOLoginRepositoryImpl

func (SSOLoginRepositoryImpl) Create

func (impl SSOLoginRepositoryImpl) Create(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)

func (SSOLoginRepositoryImpl) Delete

func (impl SSOLoginRepositoryImpl) Delete(userModel *SSOLoginModel, tx *pg.Tx) (bool, error)

func (SSOLoginRepositoryImpl) GetActive

func (impl SSOLoginRepositoryImpl) GetActive() (*SSOLoginModel, error)

func (SSOLoginRepositoryImpl) GetAll

func (impl SSOLoginRepositoryImpl) GetAll() ([]SSOLoginModel, error)

func (SSOLoginRepositoryImpl) GetById

func (impl SSOLoginRepositoryImpl) GetById(id int32) (*SSOLoginModel, error)

func (SSOLoginRepositoryImpl) GetByName

func (impl SSOLoginRepositoryImpl) GetByName(name string) (*SSOLoginModel, error)

func (*SSOLoginRepositoryImpl) GetConnection

func (impl *SSOLoginRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (SSOLoginRepositoryImpl) Update

func (impl SSOLoginRepositoryImpl) Update(userModel *SSOLoginModel, tx *pg.Tx) (*SSOLoginModel, error)

type SSOLoginService

type SSOLoginService interface {
	CreateSSOLogin(userInfo *bean.SSOLoginDto) (*bean.SSOLoginDto, error)
	UpdateSSOLogin(userInfo *bean.SSOLoginDto) (*bean.SSOLoginDto, error)
	GetById(id int32) (*bean.SSOLoginDto, error)
	GetAll() ([]*bean.SSOLoginDto, error)
	GetByName(name string) (*bean.SSOLoginDto, error)
}

type SSOLoginServiceImpl

type SSOLoginServiceImpl struct {
	K8sUtil *k8s.K8sServiceImpl
	// contains filtered or unexported fields
}

func NewSSOLoginServiceImpl

func NewSSOLoginServiceImpl(
	logger *zap.SugaredLogger,
	ssoLoginRepository SSOLoginRepository,
	K8sUtil *k8s.K8sServiceImpl, envVariables *util2.EnvironmentVariables, userAuthOidcHelper authentication.UserAuthOidcHelper) *SSOLoginServiceImpl

func (SSOLoginServiceImpl) CreateSSOLogin

func (impl SSOLoginServiceImpl) CreateSSOLogin(request *bean.SSOLoginDto) (*bean.SSOLoginDto, error)

func (SSOLoginServiceImpl) GetAll

func (impl SSOLoginServiceImpl) GetAll() ([]*bean.SSOLoginDto, error)

func (SSOLoginServiceImpl) GetById

func (impl SSOLoginServiceImpl) GetById(id int32) (*bean.SSOLoginDto, error)

func (SSOLoginServiceImpl) GetByName

func (impl SSOLoginServiceImpl) GetByName(name string) (*bean.SSOLoginDto, error)

func (SSOLoginServiceImpl) UpdateSSOLogin

func (impl SSOLoginServiceImpl) UpdateSSOLogin(request *bean.SSOLoginDto) (*bean.SSOLoginDto, error)

Jump to

Keyboard shortcuts

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