credentials

package
v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// GitHub App of VS Code's Copilot, whose ghu_ tokens the Copilot API exchanges
	ClientID = "Iv1.b507a08c87ecfe98"

	// What the exchange and the Copilot API are told the client is
	EditorVersion = "vscode/1.104.1"

	RequestUserAgent = "IcebathAgent/1.0"
)

Variables

View Source
var SignIn = credentials.SignIn{Spec: githubcopilotconfig.CopilotName, Title: "GitHub account with a device code", Type: credentials.OAuth, Run: signIn}

GitHub device code sign-in for Copilot, the approved token checked against what the Copilot API takes

Functions

func Headers

func Headers() map[string]string

Headers every request to the Copilot API carries

func Register

func Register(registry *credentials.Registry, cfg *config.Config)

func Supported

func Supported(token string) (bool, string)

Whether the Copilot API takes the token, and why not when it doesn't

Types

This section is empty.

Jump to

Keyboard shortcuts

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