update session storage version from 5 to 6 due to fosite upgrade

A small part of the session storage changed type in the latest version
of fosite compared to the old version of fosite that we were using.
Just to be safe, update our session storage version to invalidate
any pre-existing sessions upon upgrade of Pinniped.
This commit is contained in:
Ryan Richard
2023-12-04 14:49:22 -08:00
parent 37c2ce53d7
commit e1954b1df9
12 changed files with 62 additions and 57 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func TestAuthorizeCodeStorage(t *testing.T) {
// Note that CreateAuthorizeCodeSession() sets Active to true and also sets the Version before storing the session,
// so expect those here.
session.Active = true
session.Version = "5" // this is the value of the authorizationcode.authorizeCodeStorageVersion constant
session.Version = "6" // this is the value of the authorizationcode.authorizeCodeStorageVersion constant
expectedSessionStorageJSON, err := json.Marshal(session)
require.NoError(t, err)
require.JSONEq(t, string(expectedSessionStorageJSON), string(initialSecret.Data["pinniped-storage-data"]))