auth

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

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(value string) string

Types

type Auth

type Auth interface {
	SendCodeByEmail(provider *providers.Provider, email string) error
	SendCodeByPhone(provider *providers.Provider, userXid, phone string) error
	SignInWithCode(provider *providers.Provider, email, code string) (string, error)
	SignInWithPassword(provider *providers.Provider, email, password string) (string, error)
	SavePhone(provider *providers.Provider, userXid, phone, code string) error
	Logout(provider *providers.Provider, userID uint, token string) error
}

func NewAuth

func NewAuth() Auth

type AuthImpl

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

func (*AuthImpl) Logout

func (a *AuthImpl) Logout(provider *providers.Provider, userID uint, token string) error

func (*AuthImpl) SavePhone

func (a *AuthImpl) SavePhone(provider *providers.Provider, userXid, phone, code string) error

func (*AuthImpl) SendCodeByEmail

func (a *AuthImpl) SendCodeByEmail(provider *providers.Provider, email string) error

func (*AuthImpl) SendCodeByPhone

func (a *AuthImpl) SendCodeByPhone(provider *providers.Provider, userXid, phone string) error

func (*AuthImpl) SignInWithCode

func (a *AuthImpl) SignInWithCode(provider *providers.Provider, email, code string) (string, error)

func (*AuthImpl) SignInWithPassword

func (a *AuthImpl) SignInWithPassword(provider *providers.Provider, email, password string) (string, error)

Jump to

Keyboard shortcuts

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