authflow

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: BSD-3-Clause Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullAuthFlow

type FullAuthFlow interface {
	auth.UserAuthenticator

	GetAPICredentials(ctx context.Context) (int, string, error)
}

type TermAuth

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

TermAuth implements authentication via terminal.

func NewTermAuth

func NewTermAuth(phone string) TermAuth

func (TermAuth) AcceptTermsOfService

func (c TermAuth) AcceptTermsOfService(ctx context.Context, tos tg.HelpTermsOfService) error

func (TermAuth) Code

func (a TermAuth) Code(_ context.Context, code *tg.AuthSentCode) (string, error)

func (TermAuth) GetAPICredentials

func (a TermAuth) GetAPICredentials(ctx context.Context) (int, string, error)

func (TermAuth) Password

func (a TermAuth) Password(ctx context.Context) (string, error)

func (TermAuth) Phone

func (a TermAuth) Phone(_ context.Context) (string, error)

func (TermAuth) SignUp

func (c TermAuth) SignUp(ctx context.Context) (auth.UserInfo, error)

Jump to

Keyboard shortcuts

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