oauth

package
v0.0.0-...-e2e6f4c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCredentials

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

func (*ClientCredentials) Freshness

func (cc *ClientCredentials) Freshness(token string) (int64, error)

Freshness checks the expiry of a token.

func (*ClientCredentials) Issue

func (cc *ClientCredentials) Issue() (int64, string, error)

Issue and store a new token.

func (*ClientCredentials) Refresh

func (cc *ClientCredentials) Refresh(ctx context.Context)

Refresh the access token in the background, when it's invalid or about to expire.

func (*ClientCredentials) Revoke

func (cc *ClientCredentials) Revoke(token string) error

Revoke invalidates an access token.

func (*ClientCredentials) Token

func (cc *ClientCredentials) Token() string

Source Files

  • metrics.go
  • oauth.go

Jump to

Keyboard shortcuts

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