oauth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthRefresh    = "RefreshToken"
	AuthHeaderkey  = "authorization"
	AuthTypeBearer = "bearer"
	AuthPayload    = "authorization_payload"
)

Variables

View Source
var (
	GoogleCfg = oauth2.Config{}
)

Functions

This section is empty.

Types

type GoogleUser

type GoogleUser struct {
	Email         string `json:"email"`
	FamilyName    string `json:"family_name"`
	GivenName     string `json:"given_name"`
	ID            string `json:"id"`
	Locale        string `json:"locale"`
	Name          string `json:"name"`
	Picture       string `json:"picture"`
	VerifiedEmail bool   `json:"verified_email"`
}

type Handler

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

func (*Handler) GoogleToken

func (s *Handler) GoogleToken(c echo.Context) error

func (*Handler) GoogleVerif

func (s *Handler) GoogleVerif(c echo.Context) error

type OauthService

type OauthService interface {
	GoogleVerif(c echo.Context) error
	GoogleToken(c echo.Context) error
}

func NewHandler

func NewHandler(store db.PostgresStore, redis redis.Store, config util.Config, token token.Maker, apiutil apiutil.UtilTools) OauthService

Jump to

Keyboard shortcuts

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