Revert "Fix ETCD storage backend"

This commit is contained in:
Joel Speed 2019-04-18 15:17:31 +01:00
parent 41b7c855d0
commit 236b25b68e
No known key found for this signature in database
GPG key ID: 6E80578D6751DEFB

View file

@ -17,6 +17,7 @@ type AuthCode struct {
Scopes []string `json:"scopes,omitempty"`
ConnectorID string `json:"connectorID,omitempty"`
ConnectorData []byte `json:"connectorData,omitempty"`
Claims Claims `json:"claims,omitempty"`
Expiry time.Time `json:"expiry"`
@ -28,6 +29,7 @@ func fromStorageAuthCode(a storage.AuthCode) AuthCode {
ClientID: a.ClientID,
RedirectURI: a.RedirectURI,
ConnectorID: a.ConnectorID,
ConnectorData: a.ConnectorData,
Nonce: a.Nonce,
Scopes: a.Scopes,
Claims: fromStorageClaims(a.Claims),
@ -72,6 +74,7 @@ func fromStorageAuthRequest(a storage.AuthRequest) AuthRequest {
LoggedIn: a.LoggedIn,
Claims: fromStorageClaims(a.Claims),
ConnectorID: a.ConnectorID,
ConnectorData: a.ConnectorData,
}
}
@ -87,6 +90,7 @@ func toStorageAuthRequest(a AuthRequest) storage.AuthRequest {
ForceApprovalPrompt: a.ForceApprovalPrompt,
LoggedIn: a.LoggedIn,
ConnectorID: a.ConnectorID,
ConnectorData: a.ConnectorData,
Expiry: a.Expiry,
Claims: toStorageClaims(a.Claims),
}
@ -120,6 +124,7 @@ func toStorageRefreshToken(r RefreshToken) storage.RefreshToken {
LastUsed: r.LastUsed,
ClientID: r.ClientID,
ConnectorID: r.ConnectorID,
ConnectorData: r.ConnectorData,
Scopes: r.Scopes,
Nonce: r.Nonce,
Claims: toStorageClaims(r.Claims),
@ -134,6 +139,7 @@ func fromStorageRefreshToken(r storage.RefreshToken) RefreshToken {
LastUsed: r.LastUsed,
ClientID: r.ClientID,
ConnectorID: r.ConnectorID,
ConnectorData: r.ConnectorData,
Scopes: r.Scopes,
Nonce: r.Nonce,
Claims: fromStorageClaims(r.Claims),