services

package
v0.0.0-...-9c9e09e Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGoogleAuthenticationFailed = errors.New("invalid response from google API")

Functions

This section is empty.

Types

type GoogleOAuthService

type GoogleOAuthService struct {
	ClientID          string
	ClientSecret      string
	ClientCallbackURL string
	// contains filtered or unexported fields
}

func NewGoogleOAuthService

func NewGoogleOAuthService(httpClient *http.Client, clientID string, clientSecret string, clientCallbackURL string) *GoogleOAuthService

func (*GoogleOAuthService) AuthenticateUserWithToken

func (g *GoogleOAuthService) AuthenticateUserWithToken(ctx context.Context, tokenType string, token string) (*GoogleUserInfo, error)

type GoogleUserInfo

type GoogleUserInfo struct {
	Sub           string `json:"sub"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Profile       string `json:"profile"`
	Picture       string `json:"picture"`
	Email         string `json:"email"`
	VerifiedEmail bool   `json:"verified_email"`
	HD            string `json:"hd"`
}

Jump to

Keyboard shortcuts

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