github

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubOAuth2Provider

func NewGithubOAuth2Provider(config *settings.Config, redirectUrl string) (provider.OAuth2Provider, error)

NewGithubOAuth2Provider creates a new Github OAuth 2.0 provider instance

Types

type GithubOAuth2Provider

type GithubOAuth2Provider struct {
	provider.OAuth2Provider
	// contains filtered or unexported fields
}

GithubOAuth2Provider represents Github OAuth 2.0 provider

func (*GithubOAuth2Provider) GetOAuth2AuthUrl

func (p *GithubOAuth2Provider) GetOAuth2AuthUrl(c core.Context, state string, opts ...oauth2.AuthCodeOption) (string, error)

GetOAuth2AuthUrl returns the authentication url of the GitHub OAuth 2.0 provider

func (*GithubOAuth2Provider) GetOAuth2Token

func (p *GithubOAuth2Provider) GetOAuth2Token(c core.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

GetOAuth2Token returns the OAuth 2.0 token of the GitHub OAuth 2.0 provider

func (*GithubOAuth2Provider) GetUserInfo

func (p *GithubOAuth2Provider) GetUserInfo(c core.Context, oauth2Token *oauth2.Token) (*data.OAuth2UserInfo, error)

GetUserInfo returns the user info by the Github OAuth 2.0 provider

Jump to

Keyboard shortcuts

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