google

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderName = "google"

ProviderName identifica a este proveedor en las rutas y en el almacen de estado. Un consumidor lo usa con auth.PathOAuthStart / PathOAuthCallback.

Variables

This section is empty.

Functions

func AuthCodeURLHelper

func AuthCodeURLHelper(cfg auth.OAuthConfig, state string) string

func ExchangeCodeHelper

func ExchangeCodeHelper(cfg auth.OAuthConfig, code string) (auth.OAuthToken, error)

func QueryEscapeHelper

func QueryEscapeHelper(s string) string

Types

type GoogleProvider

type GoogleProvider struct {
	ClientID     string
	ClientSecret string
	RedirectURL  string
}

func (*GoogleProvider) AuthCodeURL

func (p *GoogleProvider) AuthCodeURL(state string) string

func (*GoogleProvider) ExchangeCode

func (p *GoogleProvider) ExchangeCode(code string) (auth.OAuthToken, error)

func (*GoogleProvider) GetUserInfo

func (p *GoogleProvider) GetUserInfo(token auth.OAuthToken) (auth.OAuthUserInfo, error)

func (*GoogleProvider) Name

func (p *GoogleProvider) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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