auth

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Unlicense Imports: 9 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubAuth

type GitHubAuth struct{}

func NewGitHubAuth

func NewGitHubAuth() *GitHubAuth

func (*GitHubAuth) GetUser

func (g *GitHubAuth) GetUser(accessToken string) (*User, error)

func (*GitHubAuth) Login

func (g *GitHubAuth) Login() (*Token, error)

type Provider

type Provider interface {
	Login() (*Token, error)
	GetUser(accessToken string) (*User, error)
}

Provider defines the authentication interface. Implementations exist per git provider (GitHub, GitLab, etc.).

type Token

type Token struct {
	AccessToken string
	TokenType   string
	Scope       string
}

Token represents an OAuth access token.

type User

type User struct {
	Username string
	Email    string
	ID       int64
}

User represents an authenticated user.

Jump to

Keyboard shortcuts

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