twofactorverify

package
v14.39.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package twofactorverify provides functionality for verifying two-factor authentication in GitLab.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client represents a client for interacting with the two-factor verification API.

func NewClient

func NewClient(config *config.Config) (*Client, error)

NewClient creates a new instance of the two-factor verification client.

func (*Client) PushAuth added in v14.10.0

func (c *Client) PushAuth(ctx context.Context, args *commandargs.Shell) error

PushAuth performs two-factor push authentication.

func (*Client) VerifyOTP

func (c *Client) VerifyOTP(ctx context.Context, args *commandargs.Shell, otp string) error

VerifyOTP verifies the one-time password (OTP) for two-factor authentication.

type RequestBody

type RequestBody struct {
	KeyID      string `json:"key_id,omitempty"`
	UserID     int64  `json:"user_id,omitempty"`
	OTPAttempt string `json:"otp_attempt,omitempty"`
}

RequestBody represents the request body for two-factor verification.

type Response

type Response struct {
	Success bool   `json:"success"`
	Message string `json:"message"`
}

Response represents the response from the two-factor verification API.

Jump to

Keyboard shortcuts

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