auth

package
v0.0.0-...-1e20926 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAuthData

func ValidateAuthData(provider string, authData types.M) error

ValidateAuthData 验证第三方登录数据

Types

type OAuth

type OAuth struct {
	ConsumerKey     string
	ConsumerSecret  string
	AuthToken       string
	AuthTokenSecret string
	Host            string
	OAuthParams     map[string]string
}

OAuth ...

func NewOAuth

func NewOAuth(options types.M) *OAuth

NewOAuth ...

func (*OAuth) Get

func (o *OAuth) Get(path string, params map[string]string) (types.M, error)

Get ...

func (*OAuth) Post

func (o *OAuth) Post(path string, params map[string]string, body map[string]string) (types.M, error)

Post ...

func (*OAuth) Send

func (o *OAuth) Send(req *http.Request) (types.M, error)

Send ...

type Provider

type Provider interface {
	ValidateAuthData(types.M, types.M) error
}

Provider ...

Jump to

Keyboard shortcuts

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