Documentation ¶
Index ¶
- Constants
- type ConfirmOption
- type LoginConfirmService
- func (c *LoginConfirmService) CheckIsNeedLoginConfirm() (bool, error)
- func (c *LoginConfirmService) GetApprover() string
- func (c *LoginConfirmService) GetReviewers() []string
- func (c *LoginConfirmService) GetTicketId() string
- func (c *LoginConfirmService) WaitLoginConfirm(ctx context.Context) Status
- type SSHAuthFunc
- type Status
- type UserAuthClient
Constants ¶
View Source
const ( ContextKeyUser = "CONTEXT_USER" ContextKeyClient = "CONTEXT_CLIENT" ContextKeyDirectLoginFormat = "CONTEXT_DIRECT_LOGIN_FORMAT" )
View Source
const ( AuthFailed = iota AuthBlock AuthSuccess )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfirmOption ¶
type ConfirmOption func(*connectionConfirmOption)
func ConfirmWithAssetID ¶
func ConfirmWithAssetID(AssetId string) ConfirmOption
func ConfirmWithAssetName ¶
func ConfirmWithAssetName(AssetName string) ConfirmOption
func ConfirmWithSystemUser ¶
func ConfirmWithSystemUser(sysUser *model.SystemUser) ConfirmOption
func ConfirmWithUser ¶
func ConfirmWithUser(user *model.User) ConfirmOption
type LoginConfirmService ¶
type LoginConfirmService struct {
// contains filtered or unexported fields
}
func NewLoginConfirm ¶
func NewLoginConfirm(core *core.Core, opts ...ConfirmOption) LoginConfirmService
func (*LoginConfirmService) CheckIsNeedLoginConfirm ¶
func (c *LoginConfirmService) CheckIsNeedLoginConfirm() (bool, error)
func (*LoginConfirmService) GetApprover ¶
func (c *LoginConfirmService) GetApprover() string
func (*LoginConfirmService) GetReviewers ¶
func (c *LoginConfirmService) GetReviewers() []string
func (*LoginConfirmService) GetTicketId ¶
func (c *LoginConfirmService) GetTicketId() string
func (*LoginConfirmService) WaitLoginConfirm ¶
func (c *LoginConfirmService) WaitLoginConfirm(ctx context.Context) Status
type SSHAuthFunc ¶
func SSHPasswordAndPublicKeyAuth ¶
func SSHPasswordAndPublicKeyAuth(c *core.Core) SSHAuthFunc
type UserAuthClient ¶
type UserAuthClient struct { *core.Core model.UserClient }
func (*UserAuthClient) Authenticate ¶
func (u *UserAuthClient) Authenticate(username string) (model.User, int)
func (*UserAuthClient) SetOption ¶
func (u *UserAuthClient) SetOption(setters ...model.UserClientOption)
Click to show internal directories.
Click to hide internal directories.