Update Kubernetes storage backend
This commit is contained in:
parent
c54f1656c7
commit
7a76c767fe
@ -266,7 +266,6 @@ type AuthRequest struct {
|
||||
Claims Claims `json:"claims,omitempty"`
|
||||
// The connector used to login the user. Set when the user authenticates.
|
||||
ConnectorID string `json:"connectorID,omitempty"`
|
||||
ConnectorData []byte `json:"connectorData,omitempty"`
|
||||
|
||||
Expiry time.Time `json:"expiry"`
|
||||
}
|
||||
@ -290,7 +289,6 @@ func toStorageAuthRequest(req AuthRequest) storage.AuthRequest {
|
||||
ForceApprovalPrompt: req.ForceApprovalPrompt,
|
||||
LoggedIn: req.LoggedIn,
|
||||
ConnectorID: req.ConnectorID,
|
||||
ConnectorData: req.ConnectorData,
|
||||
Expiry: req.Expiry,
|
||||
Claims: toStorageClaims(req.Claims),
|
||||
}
|
||||
@ -316,7 +314,6 @@ func (cli *client) fromStorageAuthRequest(a storage.AuthRequest) AuthRequest {
|
||||
LoggedIn: a.LoggedIn,
|
||||
ForceApprovalPrompt: a.ForceApprovalPrompt,
|
||||
ConnectorID: a.ConnectorID,
|
||||
ConnectorData: a.ConnectorData,
|
||||
Expiry: a.Expiry,
|
||||
Claims: fromStorageClaims(a.Claims),
|
||||
}
|
||||
@ -414,7 +411,6 @@ func (cli *client) 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),
|
||||
@ -428,7 +424,6 @@ func toStorageAuthCode(a AuthCode) storage.AuthCode {
|
||||
ClientID: a.ClientID,
|
||||
RedirectURI: a.RedirectURI,
|
||||
ConnectorID: a.ConnectorID,
|
||||
ConnectorData: a.ConnectorData,
|
||||
Nonce: a.Nonce,
|
||||
Scopes: a.Scopes,
|
||||
Claims: toStorageClaims(a.Claims),
|
||||
@ -472,7 +467,6 @@ 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),
|
||||
@ -494,7 +488,6 @@ func (cli *client) 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),
|
||||
@ -555,6 +548,7 @@ type OfflineSessions struct {
|
||||
UserID string `json:"userID,omitempty"`
|
||||
ConnID string `json:"connID,omitempty"`
|
||||
Refresh map[string]*storage.RefreshTokenRef `json:"refresh,omitempty"`
|
||||
ConnectorData []byte `json:"connectorData,omitempty"`
|
||||
}
|
||||
|
||||
func (cli *client) fromStorageOfflineSessions(o storage.OfflineSessions) OfflineSessions {
|
||||
@ -570,6 +564,7 @@ func (cli *client) fromStorageOfflineSessions(o storage.OfflineSessions) Offline
|
||||
UserID: o.UserID,
|
||||
ConnID: o.ConnID,
|
||||
Refresh: o.Refresh,
|
||||
ConnectorData: o.ConnectorData,
|
||||
}
|
||||
}
|
||||
|
||||
@ -578,6 +573,7 @@ func toStorageOfflineSessions(o OfflineSessions) storage.OfflineSessions {
|
||||
UserID: o.UserID,
|
||||
ConnID: o.ConnID,
|
||||
Refresh: o.Refresh,
|
||||
ConnectorData: o.ConnectorData,
|
||||
}
|
||||
if s.Refresh == nil {
|
||||
// Server code assumes this will be non-nil.
|
||||
|
Reference in New Issue
Block a user