auth

package
v2.0.0-...-30b38dd Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

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