user

package
v0.0.0-...-724633c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is a provider set for wire

Functions

This section is empty.

Types

type IBiz

type IBiz interface {
	// GetLoginURLWithLine serve caller to get line login url
	GetLoginURLWithLine(ctx contextx.Contextx, redirectURL, state, scope string, opts LineRequestOptions) (info string, err error)

	// CallbackForLine serve caller to callback after line oauth2 login
	CallbackForLine(ctx contextx.Contextx, redirectURL, code string) (info *user.Profile, err error)
}

IBiz declare user business functions

func CreateIBiz

func CreateIBiz(logger *zap.Logger, lineOpts *LineOptions, repo2 repo.IRepo, factory jwt.Factory) (IBiz, error)

func NewImpl

func NewImpl(logger *zap.Logger, lineOpts *LineOptions, repo repo.IRepo, factory jwt.Factory) IBiz

NewImpl new IBiz

type LineOptions

type LineOptions struct {
	BaseURL      string `json:"base_url" yaml:"baseURL"`
	APIURL       string `json:"api_url" yaml:"apiURL"`
	ClientID     string `json:"client_id" yaml:"clientID"`
	ClientSecret string `json:"client_secret" yaml:"clientSecret"`
}

LineOptions declare line configuration

func NewLineOptions

func NewLineOptions(v *viper.Viper) (*LineOptions, error)

NewLineOptions new line options

type LineRequestOptions

type LineRequestOptions struct {
	Nonce  string
	Prompt string
}

LineRequestOptions declare line login page configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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