auth

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithOAuth

func WithOAuth() plugins.Plugin

WithOAuth init oauth providers

Types

type Code

type Code string

type ConfigOAuth

type ConfigOAuth struct {
	Providers []oauth.ConfigOAuthItem `yaml:"oauth"`
}

ConfigOAuth oauth config model

func (*ConfigOAuth) Default

func (v *ConfigOAuth) Default()

type OAuth

type OAuth interface {
	RequestHandler(code string) func(web.Context)
	CallbackHandler(code string, handler func(web.Context, OAuthUser, Code)) func(web.Context)
}

type OAuthUser

type OAuthUser interface {
	GetName() string
	GetEmail() string
	GetIcon() string
}

Jump to

Keyboard shortcuts

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