services

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Terminal

type Terminal struct {
	// contains filtered or unexported fields
}

Terminal is responsible for implementing the functionality of Authorization for apps running in the terminal.

func NewTerminal

func NewTerminal(redirectURL string, scopes ...string) Terminal

NewTerminal creates a terminal service, using passed redirectURL and scopes.

func (Terminal) Authorize

func (t Terminal) Authorize(ctx context.Context) (*oauth2.Token, error)

Authorize authorizes app, considering that the authorization was requested from Terminal. It will open the auth link in default app, run callback server to capture the Authorization Code and exchange it.

Jump to

Keyboard shortcuts

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