login

package
v0.0.0-...-4df811a Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginService

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

func NewLoginService

func NewLoginService(serviceName string) *LoginService

NewLoginService function returns an instance of LoginService

func (*LoginService) CreateAccountAndLogin

func (s *LoginService) CreateAccountAndLogin()

CreateAccountAndLogin method creates a new user account and logs them in

func (*LoginService) Err

func (s *LoginService) Err() error

Err method returns the last error encountered

func (*LoginService) FindAccount

func (s *LoginService) FindAccount(
	user *models.User,
	current *int,
) *LoginService

finds an account matching `user` in the `account` slice

func (s *LoginService) GetLoginLink(url *string, name *string) *LoginService

GetLoginLink method returns a link to the third party to initiate the oauth process

func (*LoginService) LogIntoExisitingAccount

func (s *LoginService) LogIntoExisitingAccount(accountIndex int)

LogIntoExisitingAccount method logs an existing user in

func (*LoginService) PerformLogin

func (ls *LoginService) PerformLogin(
	currentAccount models.User,
	accountIndex int,
) bool

PerformLogin method logs a user in, creating the account if necessary

func (*LoginService) PromptDeviceName

func (ls *LoginService) PromptDeviceName(skipPrompts bool) *LoginService

PromptDeviceName method asks the user for their device name

func (*LoginService) WaitForExternalLogin

func (s *LoginService) WaitForExternalLogin() *LoginService

WaitForExternalLogin method polls the API regularly to check if the user has completed the login on the third party an authorized access for Keystone

Jump to

Keyboard shortcuts

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