user

package
v0.0.0-...-ea208d4 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: BSD-2-Clause Imports: 0 Imported by: 0

Documentation

Overview

package user provides url constants and structures for handling user information from various oauth providers

Index

Constants

This section is empty.

Variables

View Source
var (
	Google   = "https://www.googleapis.com/userinfo/v2/me"
	LinkedIn = "https://api.linkedin.com/v1/people/~:(first-name,last-name,email-address)?format=json"
	Orcid    = "https://pub.orcid.org/v2.1"
)

Functions

This section is empty.

Types

type GoogleUser

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

type LinkedInUser

type LinkedInUser struct {
	FirstName                  string `json:"firstName"`
	Headline                   string `json:"headline"`
	ID                         string `json:"id"`
	LastName                   string `json:"lastName"`
	SiteStandardProfileRequest struct {
		URL string `json:"url"`
	} `json:"siteStandardProfileRequest"`
	EmailAddress string `json:"emailAddress"`
}

type NormalizedUser

type NormalizedUser struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	ID       string `json:"id"`
	Provider string `json:"provider"`
}

type OrcidUser

type OrcidUser struct {
	Name         string `json:"name"`
	AccessToken  string `json:"access_token"`
	ExpiresIn    int    `json:"expires_in"`
	TokenType    string `json:"token_type"`
	Orcid        string `json:"orcid"`
	Scope        string `json:"scope"`
	RefreshToken string `json:"refresh_token"`
}

Jump to

Keyboard shortcuts

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