Revert "Fix ETCD storage backend"
This commit is contained in:
parent
41b7c855d0
commit
236b25b68e
@ -16,22 +16,24 @@ type AuthCode struct {
|
|||||||
Nonce string `json:"nonce,omitempty"`
|
Nonce string `json:"nonce,omitempty"`
|
||||||
Scopes []string `json:"scopes,omitempty"`
|
Scopes []string `json:"scopes,omitempty"`
|
||||||
|
|
||||||
ConnectorID string `json:"connectorID,omitempty"`
|
ConnectorID string `json:"connectorID,omitempty"`
|
||||||
Claims Claims `json:"claims,omitempty"`
|
ConnectorData []byte `json:"connectorData,omitempty"`
|
||||||
|
Claims Claims `json:"claims,omitempty"`
|
||||||
|
|
||||||
Expiry time.Time `json:"expiry"`
|
Expiry time.Time `json:"expiry"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromStorageAuthCode(a storage.AuthCode) AuthCode {
|
func fromStorageAuthCode(a storage.AuthCode) AuthCode {
|
||||||
return AuthCode{
|
return AuthCode{
|
||||||
ID: a.ID,
|
ID: a.ID,
|
||||||
ClientID: a.ClientID,
|
ClientID: a.ClientID,
|
||||||
RedirectURI: a.RedirectURI,
|
RedirectURI: a.RedirectURI,
|
||||||
ConnectorID: a.ConnectorID,
|
ConnectorID: a.ConnectorID,
|
||||||
Nonce: a.Nonce,
|
ConnectorData: a.ConnectorData,
|
||||||
Scopes: a.Scopes,
|
Nonce: a.Nonce,
|
||||||
Claims: fromStorageClaims(a.Claims),
|
Scopes: a.Scopes,
|
||||||
Expiry: a.Expiry,
|
Claims: fromStorageClaims(a.Claims),
|
||||||
|
Expiry: a.Expiry,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,6 +74,7 @@ func fromStorageAuthRequest(a storage.AuthRequest) AuthRequest {
|
|||||||
LoggedIn: a.LoggedIn,
|
LoggedIn: a.LoggedIn,
|
||||||
Claims: fromStorageClaims(a.Claims),
|
Claims: fromStorageClaims(a.Claims),
|
||||||
ConnectorID: a.ConnectorID,
|
ConnectorID: a.ConnectorID,
|
||||||
|
ConnectorData: a.ConnectorData,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,6 +90,7 @@ func toStorageAuthRequest(a AuthRequest) storage.AuthRequest {
|
|||||||
ForceApprovalPrompt: a.ForceApprovalPrompt,
|
ForceApprovalPrompt: a.ForceApprovalPrompt,
|
||||||
LoggedIn: a.LoggedIn,
|
LoggedIn: a.LoggedIn,
|
||||||
ConnectorID: a.ConnectorID,
|
ConnectorID: a.ConnectorID,
|
||||||
|
ConnectorData: a.ConnectorData,
|
||||||
Expiry: a.Expiry,
|
Expiry: a.Expiry,
|
||||||
Claims: toStorageClaims(a.Claims),
|
Claims: toStorageClaims(a.Claims),
|
||||||
}
|
}
|
||||||
@ -114,29 +118,31 @@ type RefreshToken struct {
|
|||||||
|
|
||||||
func toStorageRefreshToken(r RefreshToken) storage.RefreshToken {
|
func toStorageRefreshToken(r RefreshToken) storage.RefreshToken {
|
||||||
return storage.RefreshToken{
|
return storage.RefreshToken{
|
||||||
ID: r.ID,
|
ID: r.ID,
|
||||||
Token: r.Token,
|
Token: r.Token,
|
||||||
CreatedAt: r.CreatedAt,
|
CreatedAt: r.CreatedAt,
|
||||||
LastUsed: r.LastUsed,
|
LastUsed: r.LastUsed,
|
||||||
ClientID: r.ClientID,
|
ClientID: r.ClientID,
|
||||||
ConnectorID: r.ConnectorID,
|
ConnectorID: r.ConnectorID,
|
||||||
Scopes: r.Scopes,
|
ConnectorData: r.ConnectorData,
|
||||||
Nonce: r.Nonce,
|
Scopes: r.Scopes,
|
||||||
Claims: toStorageClaims(r.Claims),
|
Nonce: r.Nonce,
|
||||||
|
Claims: toStorageClaims(r.Claims),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromStorageRefreshToken(r storage.RefreshToken) RefreshToken {
|
func fromStorageRefreshToken(r storage.RefreshToken) RefreshToken {
|
||||||
return RefreshToken{
|
return RefreshToken{
|
||||||
ID: r.ID,
|
ID: r.ID,
|
||||||
Token: r.Token,
|
Token: r.Token,
|
||||||
CreatedAt: r.CreatedAt,
|
CreatedAt: r.CreatedAt,
|
||||||
LastUsed: r.LastUsed,
|
LastUsed: r.LastUsed,
|
||||||
ClientID: r.ClientID,
|
ClientID: r.ClientID,
|
||||||
ConnectorID: r.ConnectorID,
|
ConnectorID: r.ConnectorID,
|
||||||
Scopes: r.Scopes,
|
ConnectorData: r.ConnectorData,
|
||||||
Nonce: r.Nonce,
|
Scopes: r.Scopes,
|
||||||
Claims: fromStorageClaims(r.Claims),
|
Nonce: r.Nonce,
|
||||||
|
Claims: fromStorageClaims(r.Claims),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user