auth

package
v0.0.0-...-4648e5f Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	GenerateAuthLink(fn, uuid string) (string, error)
	GetConfig() (*oidc.Provider, oauth2.Config, error)
	GetAccessToken(code string) (*oidc.UserInfo, *oauth2.Token, error)
}

func NewAuthenticator

func NewAuthenticator(cfg *config.Config) Authenticator

type OIDCProvider

type OIDCProvider struct {
	ClientID     string
	ClientSecret string
	Issuer       string
	CallbackURL  string
}
func (o *OIDCProvider) GenerateAuthLink(fn string, uuid string) (string, error)

func (*OIDCProvider) GetAccessToken

func (o *OIDCProvider) GetAccessToken(code string) (*oidc.UserInfo, *oauth2.Token, error)

func (*OIDCProvider) GetConfig

func (o *OIDCProvider) GetConfig() (*oidc.Provider, oauth2.Config, error)

Jump to

Keyboard shortcuts

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