Documentation ¶
Index ¶
- Constants
- func CreateSelectOptionsQuestion(options []string) string
- func GetUsernameFromSSHCtx(ctx ssh.Context) string
- func HTTPMiddleDebugAuth() gin.HandlerFunc
- func HTTPMiddleSessionAuth(jmsService *service.JMService) gin.HandlerFunc
- func SSHKeyboardInteractiveAuth(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) error
- type DirectLoginAssetReq
- type LoginReviewService
- type ReviewOption
- type SSHAuthFunc
- type Status
- type StatusAuth
- type UserAuthClient
- func (u *UserAuthClient) Authenticate(ctx context.Context) (user model.User, authStatus StatusAuth)
- func (u *UserAuthClient) CancelConfirm()
- func (u *UserAuthClient) CheckConfirm(ctx context.Context) (user model.User, authStatus StatusAuth)
- func (u *UserAuthClient) CheckConfirmAuth(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) (ok bool)
- func (u *UserAuthClient) CheckMFAAuth(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) (ok bool)
- func (u *UserAuthClient) CheckUserOTP(ctx context.Context, MFAType string, code string) (user model.User, authStatus StatusAuth)
- func (u *UserAuthClient) GetMFAOptions() []string
Constants ¶
View Source
const ( ContextKeyUser = "CONTEXT_USER" ContextKeyClient = "CONTEXT_CLIENT" ContextKeyAuthStatus = "CONTEXT_AUTH_STATUS" ContextKeyAuthFailed = "CONTEXT_AUTH_FAILED" ContextKeyDirectLoginFormat = "CONTEXT_DIRECT_LOGIN_FORMAT" )
View Source
const ( SeparatorATSign = "@" SeparatorHashMark = "#" )
View Source
const ( ErrLoginConfirmWait = "login_confirm_wait" ErrLoginConfirmRejected = "login_confirm_rejected" ErrMFARequired = "mfa_required" )
Variables ¶
This section is empty.
Functions ¶
func GetUsernameFromSSHCtx ¶
func HTTPMiddleDebugAuth ¶
func HTTPMiddleDebugAuth() gin.HandlerFunc
func HTTPMiddleSessionAuth ¶
func HTTPMiddleSessionAuth(jmsService *service.JMService) gin.HandlerFunc
func SSHKeyboardInteractiveAuth ¶
func SSHKeyboardInteractiveAuth(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) error
Types ¶
type DirectLoginAssetReq ¶
type DirectLoginAssetReq struct { Username string Protocol string AccountUsername string AssetTarget string ConnectToken *model.ConnectToken }
func ParseDirectUserFormat ¶
func ParseDirectUserFormat(s string) (DirectLoginAssetReq, bool)
func (*DirectLoginAssetReq) Authenticate ¶
func (d *DirectLoginAssetReq) Authenticate(password string) bool
func (*DirectLoginAssetReq) IsToken ¶
func (d *DirectLoginAssetReq) IsToken() bool
func (*DirectLoginAssetReq) User ¶
func (d *DirectLoginAssetReq) User() string
type LoginReviewService ¶
type LoginReviewService struct {
// contains filtered or unexported fields
}
func NewLoginReview ¶
func NewLoginReview(jmsService *service.JMService, opts ...ReviewOption) LoginReviewService
func (*LoginReviewService) GetProcessor ¶
func (c *LoginReviewService) GetProcessor() string
func (*LoginReviewService) GetReviewers ¶
func (c *LoginReviewService) GetReviewers() []string
func (*LoginReviewService) GetTicketUrl ¶
func (c *LoginReviewService) GetTicketUrl() string
func (*LoginReviewService) WaitLoginConfirm ¶
func (c *LoginReviewService) WaitLoginConfirm(ctx context.Context) Status
type ReviewOption ¶
type ReviewOption func(*reviewOption)
func WithReviewTokenInfo ¶
func WithReviewTokenInfo(info *model.ConnectTokenInfo) ReviewOption
func WithReviewUser ¶
func WithReviewUser(user *model.User) ReviewOption
type SSHAuthFunc ¶
func SSHPasswordAndPublicKeyAuth ¶
func SSHPasswordAndPublicKeyAuth(jmsService *service.JMService) SSHAuthFunc
type StatusAuth ¶
type StatusAuth int64
type UserAuthClient ¶
type UserAuthClient struct { *service.UserClient // contains filtered or unexported fields }
func (*UserAuthClient) Authenticate ¶
func (u *UserAuthClient) Authenticate(ctx context.Context) (user model.User, authStatus StatusAuth)
func (*UserAuthClient) CancelConfirm ¶
func (u *UserAuthClient) CancelConfirm()
func (*UserAuthClient) CheckConfirm ¶
func (u *UserAuthClient) CheckConfirm(ctx context.Context) (user model.User, authStatus StatusAuth)
func (*UserAuthClient) CheckConfirmAuth ¶
func (u *UserAuthClient) CheckConfirmAuth(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) (ok bool)
func (*UserAuthClient) CheckMFAAuth ¶
func (u *UserAuthClient) CheckMFAAuth(ctx ssh.Context, challenger gossh.KeyboardInteractiveChallenge) (ok bool)
func (*UserAuthClient) CheckUserOTP ¶
func (u *UserAuthClient) CheckUserOTP(ctx context.Context, MFAType string, code string) (user model.User, authStatus StatusAuth)
func (*UserAuthClient) GetMFAOptions ¶
func (u *UserAuthClient) GetMFAOptions() []string
Click to show internal directories.
Click to hide internal directories.