mirror of
https://github.com/volatiletech/authboss.git
synced 2025-07-15 01:24:33 +02:00
Introduce new type of client storage
- This addresses the problem of having to update multiple times during one request. It's hard to have a nice interface especially with JWT because you always end up having to decode the request, encode new response, write header, then a second write to it comes, and where do you grab the value from? Often you don't have access to the response as a "read" structure. So we store it as events instead, and play those events against the original data right before the response is written to set the headers.
This commit is contained in:
18
config.go
18
config.go
@ -97,14 +97,16 @@ type Config struct {
|
||||
// Storer is the interface through which Authboss accesses the web apps database.
|
||||
StoreLoader StoreLoader
|
||||
|
||||
// CookieStoreMaker must be defined to provide an interface capapable of storing cookies
|
||||
// for the given response, and reading them from the request.
|
||||
CookieStoreMaker ClientStoreMaker
|
||||
// SessionStoreMaker must be defined to provide an interface capable of storing session-only
|
||||
// values for the given response, and reading them from the request.
|
||||
SessionStoreMaker ClientStoreMaker
|
||||
// LogWriter is written to when errors occur, as well as on startup to show which modules are loaded
|
||||
// and which routes they registered. By default writes to io.Discard.
|
||||
// CookieStateStorer must be defined to provide an interface capapable of
|
||||
// storing cookies for the given response, and reading them from the request.
|
||||
CookieStateStorer ClientStateReadWriter
|
||||
// SessionStateStorer must be defined to provide an interface capable of
|
||||
// storing session-only values for the given response, and reading them
|
||||
// from the request.
|
||||
SessionStateStorer ClientStateReadWriter
|
||||
// LogWriter is written to when errors occur, as well as on startup to show
|
||||
// which modules are loaded and which routes they registered. By default
|
||||
// writes to io.Discard.
|
||||
LogWriter io.Writer
|
||||
// Mailer is the mailer being used to send e-mails out. Authboss defines two loggers for use
|
||||
// LogMailer and SMTPMailer, the default is a LogMailer to io.Discard.
|
||||
|
Reference in New Issue
Block a user