devicecode

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GrantType = "urn:ietf:params:oauth:grant-type:device_code"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	DeviceCode              string `json:"device_code"`
	UserCode                string `json:"user_code"`
	VerificationURI         string `json:"verification_uri"`
	VerificationURIComplete string `json:"verification_uri_complete,omitempty"`
	ExpiresIn               int32  `json:"expires_in"`
	Interval                int32  `json:"interval,omitempty"`
}

type Config

type Config struct {
	*oauth2.Config

	DeviceURL string
}

func (*Config) DeviceCodeAuth

func (c *Config) DeviceCodeAuth(ctx context.Context) (*Auth, error)

func (*Config) DeviceCodeExchange

func (c *Config) DeviceCodeExchange(ctx context.Context, deviceCode string) (*oauth2.Token, error)

Jump to

Keyboard shortcuts

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