mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-10 16:01:04 +00:00
auth_handler.go: use encryption in tests
Our unit tests are gonna touch a lot more corner cases than our integration tests, so let's make them run as close to the real implementation as possible. Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
committed by
Andrew Keesler
parent
5fd105496f
commit
6d380c629a
@@ -138,7 +138,8 @@ func TestAuthorizationEndpoint(t *testing.T) {
|
||||
expectedUpstreamCodeChallenge := "VVaezYqum7reIhoavCHD1n2d-piN3r_mywoYj7fCR7g"
|
||||
|
||||
var encoderHashKey = []byte("fake-hash-secret")
|
||||
var happyEncoder = securecookie.New(encoderHashKey, nil) // note that nil block key argument turns off encryption
|
||||
var encoderBlockKey = []byte("0123456789ABCDEF") // block encryption requires 16/24/32 bytes for AES
|
||||
var happyEncoder = securecookie.New(encoderHashKey, encoderBlockKey) // note that nil block key argument turns off encryption
|
||||
happyEncoder.SetSerializer(securecookie.JSONEncoder{})
|
||||
|
||||
encodeQuery := func(query map[string]string) string {
|
||||
|
||||
Reference in New Issue
Block a user