From 41b7c855d0d95b6e941704f0ab07f218927503d3 Mon Sep 17 00:00:00 2001 From: Joel Speed Date: Thu, 18 Apr 2019 15:06:48 +0100 Subject: [PATCH] Revert "Update conformance" This reverts commit 9c7ceabe8aebf6c740c237c5e76c21397179f901. --- storage/conformance/conformance.go | 65 ++++++++++++++++------------- storage/conformance/transactions.go | 1 + 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/storage/conformance/conformance.go b/storage/conformance/conformance.go index ea21edae..9832a7d8 100644 --- a/storage/conformance/conformance.go +++ b/storage/conformance/conformance.go @@ -91,6 +91,7 @@ func testAuthRequestCRUD(t *testing.T, s storage.Storage) { LoggedIn: true, Expiry: neverExpire, ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "1", Username: "jane", @@ -122,6 +123,7 @@ func testAuthRequestCRUD(t *testing.T, s storage.Storage) { LoggedIn: true, Expiry: neverExpire, ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "2", Username: "john", @@ -163,13 +165,14 @@ func testAuthRequestCRUD(t *testing.T, s storage.Storage) { func testAuthCodeCRUD(t *testing.T, s storage.Storage) { a1 := storage.AuthCode{ - ID: storage.NewID(), - ClientID: "client1", - RedirectURI: "https://localhost:80/callback", - Nonce: "foobar", - Scopes: []string{"openid", "email"}, - Expiry: neverExpire, - ConnectorID: "ldap", + ID: storage.NewID(), + ClientID: "client1", + RedirectURI: "https://localhost:80/callback", + Nonce: "foobar", + Scopes: []string{"openid", "email"}, + Expiry: neverExpire, + ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "1", Username: "jane", @@ -184,13 +187,14 @@ func testAuthCodeCRUD(t *testing.T, s storage.Storage) { } a2 := storage.AuthCode{ - ID: storage.NewID(), - ClientID: "client2", - RedirectURI: "https://localhost:80/callback", - Nonce: "foobar", - Scopes: []string{"openid", "email"}, - Expiry: neverExpire, - ConnectorID: "ldap", + ID: storage.NewID(), + ClientID: "client2", + RedirectURI: "https://localhost:80/callback", + Nonce: "foobar", + Scopes: []string{"openid", "email"}, + Expiry: neverExpire, + ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "2", Username: "john", @@ -319,6 +323,7 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) { EmailVerified: true, Groups: []string{"a", "b"}, }, + ConnectorData: []byte(`{"some":"data"}`), } if err := s.CreateRefresh(refresh); err != nil { t.Fatalf("create refresh token: %v", err) @@ -372,6 +377,7 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) { EmailVerified: true, Groups: []string{"a", "b"}, }, + ConnectorData: []byte(`{"some":"data"}`), } if err := s.CreateRefresh(refresh2); err != nil { @@ -725,13 +731,14 @@ func testGC(t *testing.T, s storage.Storage) { expiry := time.Now().In(est) c := storage.AuthCode{ - ID: storage.NewID(), - ClientID: "foobar", - RedirectURI: "https://localhost:80/callback", - Nonce: "foobar", - Scopes: []string{"openid", "email"}, - Expiry: expiry, - ConnectorID: "ldap", + ID: storage.NewID(), + ClientID: "foobar", + RedirectURI: "https://localhost:80/callback", + Nonce: "foobar", + Scopes: []string{"openid", "email"}, + Expiry: expiry, + ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "1", Username: "jane", @@ -783,6 +790,7 @@ func testGC(t *testing.T, s storage.Storage) { LoggedIn: true, Expiry: expiry, ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "1", Username: "jane", @@ -835,13 +843,14 @@ func testTimezones(t *testing.T, s storage.Storage) { expiry := time.Now().In(est).Round(time.Millisecond) c := storage.AuthCode{ - ID: storage.NewID(), - ClientID: "foobar", - RedirectURI: "https://localhost:80/callback", - Nonce: "foobar", - Scopes: []string{"openid", "email"}, - Expiry: expiry, - ConnectorID: "ldap", + ID: storage.NewID(), + ClientID: "foobar", + RedirectURI: "https://localhost:80/callback", + Nonce: "foobar", + Scopes: []string{"openid", "email"}, + Expiry: expiry, + ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "1", Username: "jane", diff --git a/storage/conformance/transactions.go b/storage/conformance/transactions.go index 2eb509e1..dc1be1b6 100644 --- a/storage/conformance/transactions.go +++ b/storage/conformance/transactions.go @@ -67,6 +67,7 @@ func testAuthRequestConcurrentUpdate(t *testing.T, s storage.Storage) { LoggedIn: true, Expiry: neverExpire, ConnectorID: "ldap", + ConnectorData: []byte(`{"some":"data"}`), Claims: storage.Claims{ UserID: "1", Username: "jane",