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

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