auth

package
v0.0.0-...-353bbc6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: GPL-3.0 Imports: 10 Imported by: 4 modules, 5 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 Config

type Config struct {
	ID        string
	Secret    string
	OAuthHost string
	Host      string
	State     string
	Login     HandleConf
	Logout    HandleConf
	Callback  HandleConf
}

Basic configuration for an Auth

func (*Config) OAuth

func (c *Config) OAuth(root *gin.RouterGroup) *oauth2.Config

OAuth return the oauth2 configuration struct

type Engine

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

Engine is e struct that eases Github OAuth and resource handling

func NewEngine

func NewEngine(conf Config, root *gin.RouterGroup) *Engine

NewEngine creates a new Engine using and adds the handle for authentication

func (*Engine) EnsureUser

func (e *Engine) EnsureUser(c *gin.Context)

type HandleConf

type HandleConf struct {
	Endpoint string
	Redirect string
}

HandleConf contains info about and Handler

Jump to

Keyboard shortcuts

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