oauth

package
v0.0.0-...-c283e9f Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RefreshTokenExpiry    = "refresh_token_expiry"
	RefreshTokenIssueTime = "refresh_token_issue_time"
)

Variables

This section is empty.

Functions

func BuildMetadataURL

func BuildMetadataURL(issuer string) (metadataURL, clientID string, err error)

func RefreshToken

func RefreshToken(c *oauth2.Config, t *oauth2.Token, audience string) (*oauth2.Token, error)

Types

type Error

type Error struct {
	Code        string `json:"error"`
	Description string `json:"error_description"`
}

func (Error) Error

func (e Error) Error() string

type IssuerMetadata

type IssuerMetadata struct {
	AuthorizationEndpoint string `json:"authorization_endpoint"`
	TokenEndpoint         string `json:"token_endpoint"`
	AudiencesEndpoint     string `json:"audiences_endpoint"`
}

func GetMetadata

func GetMetadata(u string) (*IssuerMetadata, error)

Jump to

Keyboard shortcuts

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