auth

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 81 Imported by: 0

Documentation

Overview

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Package auth - Content managed by Project Forge, see [projectforge.md] for details.

Index

Constants

View Source
const (
	OpenIDConnectKey = "openid_connect"
)
View Source
const WebAuthKey = "auth"

Variables

View Source
var (
	AvailableProviderNames map[string]string
	AvailableProviderKeys  []string
)

Functions

func BeginAuthHandler

func BeginAuthHandler(prv *Provider, rc *fasthttp.RequestCtx, websess util.ValueMap, logger util.Logger) (string, error)

func CompleteUserAuth

func CompleteUserAuth(prv *Provider, rc *fasthttp.RequestCtx, websess util.ValueMap, logger util.Logger) (*user.Account, user.Accounts, error)

func Logout

func Logout(rc *fasthttp.RequestCtx, websess util.ValueMap, logger util.Logger, prvKeys ...string) error

func ProviderUsage

func ProviderUsage(id string, enabled bool) string

Types

type Provider

type Provider struct {
	ID     string   `json:"id"`
	Title  string   `json:"title"`
	Key    string   `json:"-"`
	Secret string   `json:"-"`
	Scopes []string `json:"-"`
}

func (*Provider) Goth

func (p *Provider) Goth(proto string, host string) (goth.Provider, error)

type Providers

type Providers []*Provider

func (Providers) Contains

func (p Providers) Contains(id string) bool

func (Providers) Get

func (p Providers) Get(id string) *Provider

func (Providers) IDs

func (p Providers) IDs() []string

func (Providers) Titles

func (p Providers) Titles() []string

type Service

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

func NewService

func NewService(baseURL string, port uint16, logger util.Logger) *Service

func (*Service) LoginURL

func (s *Service) LoginURL() string

func (*Service) Providers

func (s *Service) Providers(logger util.Logger) (Providers, error)

Directories

Path Synopsis
Package msfix - Content managed by Project Forge, see [projectforge.md] for details.
Package msfix - Content managed by Project Forge, see [projectforge.md] for details.

Jump to

Keyboard shortcuts

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