oauth

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 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 OAuthProvider

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

func NewOAuthProvider

func NewOAuthProvider(service Service, provider *secure.Provider) *OAuthProvider

func (*OAuthProvider) GetName

func (p *OAuthProvider) GetName() string

func (*OAuthProvider) GetRouter

func (p *OAuthProvider) GetRouter(r chi.Router)

type Service

type Service interface {
	GetName() string
	GenerateLink(redirectURL string) string
	Authentificate(r *http.Request) (UserData, error)
}

type SimpleUserData

type SimpleUserData map[string]string

func (SimpleUserData) GetData

func (s SimpleUserData) GetData() map[string]string

func (SimpleUserData) GetUniqueID

func (s SimpleUserData) GetUniqueID() string

type UserData

type UserData interface {
	GetUniqueID() string
	GetData() map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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