server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 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 Favicon16x16Handler added in v0.3.0

func Favicon16x16Handler() http.Handler

func Favicon32x32Handler added in v0.3.0

func Favicon32x32Handler() http.Handler

func FaviconHandler

func FaviconHandler() http.Handler

func HealthHandler

func HealthHandler(peopleStore people.Store) http.Handler

func IndexHandler

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

func LoginHandler

func LoginHandler(basePath string, peopleStore people.Store, issuer string) http.Handler

func LogoutHandler

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

func PeopleAPIHandler

func PeopleAPIHandler(peopleStore people.Store, customVersions map[string]map[string]string) 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,omitempty"`
	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"`
	EnableRefreshTokenRotation bool                              `json:"enable_refresh_token_rotation"`
	PeopleStore                *people.StoreSettings             `json:"people_store,omitempty"`
	DisablePeopleAPI           bool                              `json:"disable_people_api,omitempty"`
	PeopleAPICustomVersions    map[string]map[string]string      `json:"people_api_custom_versions,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