server

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldUserID   = "user_id"
	FieldPassword = "password"
)

Variables

This section is empty.

Functions

func FaviconHandler

func FaviconHandler() http.Handler

func HealthHandler

func HealthHandler(peopleStore people.Store) http.Handler

func IndexHandler

func IndexHandler(settings *Settings, peopleStore people.Store, scope string, usePKCE bool) http.Handler

func LoginHandler

func LoginHandler(settings *Settings, peopleStore people.Store, sessionStore sessions.Store) http.Handler

func LogoutHandler

func LogoutHandler(settings *Settings, sessionStore sessions.Store, clients oauth2.Clients) http.Handler

func PeopleAPIHandler

func PeopleAPIHandler(peopleStore people.Store) http.Handler

func StyleHandler

func StyleHandler() http.Handler

Types

type Settings

type Settings struct {
	Issuer                     string                            `json:"issuer"`
	Port                       int                               `json:"port"`
	Users                      map[string]people.AuthenticPerson `json:"users"`
	Key                        string                            `json:"key"`
	AdditionalKeys             []string                          `json:"additional_keys,omitempty"`
	Clients                    oauth2.Clients                    `json:"clients"`
	ExtraScope                 string                            `json:"extra_scope,omitempty"`
	AccessTokenExtraClaims     map[string]string                 `json:"access_token_extra_claims"`
	AccessTokenTTL             int                               `json:"access_token_ttl"`
	RefreshTokenTTL            int                               `json:"refresh_token_ttl"`
	IDTokenTTL                 int                               `json:"id_token_ttl"`
	IDTokenExtraClaims         map[string]string                 `json:"id_token_extra_claims"`
	SessionSecret              string                            `json:"session_secret"`
	SessionName                string                            `json:"session_name"`
	SessionTTL                 int                               `json:"session_ttl"`
	DisablePKCE                bool                              `json:"disable_pkce"`
	EnableRefreshTokenRotation bool                              `json:"enable_refresh_token_rotation"`
	PeopleStore                *people.StoreSettings             `json:"people_store,omitempty"`
	DisablePeopleAPI           bool                              `json:"disable_people_api,omitempty"`
	// contains filtered or unexported fields
}

func NewDefaultSettings

func NewDefaultSettings() *Settings

func (Settings) AllKeys

func (s Settings) AllKeys() map[string]*rsa.PublicKey

func (Settings) KeyID

func (s Settings) KeyID() string

func (*Settings) LoadKeys

func (s *Settings) LoadKeys(basePath string, genNew bool) error

func (Settings) PrivateKey

func (s Settings) PrivateKey() *rsa.PrivateKey

func (Settings) PublicKey

func (s Settings) PublicKey() *rsa.PublicKey

Jump to

Keyboard shortcuts

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