oauth

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleAuthContent added in v0.1.2

type GoogleAuthContent struct {
	ID            string `json:"id"`
	Email         string `json:"email"`
	VerifiedEmail bool   `json:"verified_email"`
	Link          string `json:"link"`
	Picture       string `json:"picture"`
}

GoogleAuthContent is the struct in which we can marshal the data sent by google after successful authorization.

func (*GoogleAuthContent) Unmarshal added in v0.1.3

func (c *GoogleAuthContent) Unmarshal(b []byte) error

type Provider

type Provider interface {
	Url() string
	GetUserInfo(r *http.Request) ([]byte, error)
}

Provider provides a URL to redirect for oauth

func NewGoogleProvider

func NewGoogleProvider(redirectURL, clientId, clientSecret string) Provider

Jump to

Keyboard shortcuts

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