traefik_github_oauth_server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApiSecretKeyMiddleware

func NewApiSecretKeyMiddleware(apiSecretKey string) gin.HandlerFunc

NewApiSecretKeyMiddleware returns a middleware that checks the api secret key.

Types

type App

type App struct {
	Config             *Config
	Server             *http.Server
	Engine             *gin.Engine
	GitHubOAuthConfig  *oauth2.Config
	AuthRequestManager *AuthRequestManager
}

App the Traefik GitHub OAuth server application.

func NewApp

func NewApp(config *Config, server *http.Server, engine *gin.Engine, authRequestManager *AuthRequestManager) *App

func NewDefaultApp

func NewDefaultApp() *App

func (*App) Run

func (app *App) Run()

type AuthRequestManager

type AuthRequestManager struct {
	// contains filtered or unexported fields
}

func NewAuthRequestManager

func NewAuthRequestManager(cache *cache.Cache) *AuthRequestManager

func (*AuthRequestManager) Get

func (*AuthRequestManager) Insert

func (m *AuthRequestManager) Insert(aq *model.AuthRequest) string

func (*AuthRequestManager) Pop

type Config

type Config struct {
	ApiBaseURL              string
	ApiSecretKey            string
	ServerAddress           string
	DebugMode               bool
	GitHubOAuthClientID     string
	GitHubOAuthClientSecret string
}

func NewConfigFromEnv

func NewConfigFromEnv() *Config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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