oauth

package
v0.0.0-...-8adf444 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OAUTH_ACCESS_TOKEN_URL = "https://www.googleapis.com/oauth2/v4/token"
	OAUTH_ISSUE_TOKEN_URL  = "https://oauthaccountmanager.googleapis.com/v1/issuetoken"
)

Variables

This section is empty.

Functions

func GetAccessToken

func GetAccessToken() string

GetAccessToken gets the initial "access_token"

func GetToken

func GetToken() string

GetToken return a Bearer Token that can be used to make OnHub API calls

Types

type PersistedToken

type PersistedToken struct {
	Token      string
	ExpiryDate time.Time
}

func GetIssuedToken

func GetIssuedToken(accessToken string) PersistedToken

GetIssuedToken gets the issue API Token based on the accessToken

type TokenStore

type TokenStore struct {
	Token PersistedToken
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳