mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
CookieStore's ClearSession now properly clears the user session cookie by setting MaxAge to -1. internal/sessions: move encoder interface to encoding package, and rename to MarshalUnmarshaler. internal/encoding: move mock to own package authenticate: use INFO log level for authZ error. Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
18 lines
527 B
Go
18 lines
527 B
Go
package mock // import "github.com/pomerium/pomerium/internal/encoding/mock"
|
|
|
|
// Encoder MockCSRFStore is a mock implementation of Cipher.
|
|
type Encoder struct {
|
|
MarshalResponse []byte
|
|
MarshalError error
|
|
UnmarshalError error
|
|
}
|
|
|
|
// Marshal is a mock implementation of Encoder.
|
|
func (mc Encoder) Marshal(i interface{}) ([]byte, error) {
|
|
return mc.MarshalResponse, mc.MarshalError
|
|
}
|
|
|
|
// Unmarshal is a mock implementation of Encoder.
|
|
func (mc Encoder) Unmarshal(s []byte, i interface{}) error {
|
|
return mc.UnmarshalError
|
|
}
|