auth

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ClientID = "039e1e052b348d4e45e55bd50bd5cd1fa28b6ee3d044962587fd78bf68ceae4f"

Variables

This section is empty.

Functions

func Config

func Config(baseURL string) *oauth2.Config

Config creates an OAuth2 config for the GitLab instance at baseURL. If baseURL is empty, it defaults to gitlab.com.

func FileTokenSource

func FileTokenSource(ctx context.Context, filename string, config *oauth2.Config) oauth2.TokenSource

FileTokenSource returns an oauth2.TokenSource that is backed by a file on the file system. The token is refreshed automatically. New tokens are automatically written to the file.

func StoreToken

func StoreToken(filename string, token *oauth2.Token) error

StoreToken writes the provided token to the specified file.

func TokenPath

func TokenPath() string

TokenPath returns the path of the token file based on the operating system:

- Mac OS: `~/Library/Application Support/gitlab-mcp/token.json` - Linux: `~/.config/gitlab-mcp/token.json` - Windows: `%APPDATA%\gitlab-mcp\token.json` - Other: `~/.gitlab-mcp/token.json`

Types

This section is empty.

Jump to

Keyboard shortcuts

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