Remove connectordata from other structs
This commit is contained in:
parent
0352258093
commit
5c88713177
@ -259,7 +259,6 @@ func TestRefreshToken(t *testing.T) {
|
||||
EmailVerified: true,
|
||||
Groups: []string{"a", "b"},
|
||||
},
|
||||
ConnectorData: []byte(`{"some":"data"}`),
|
||||
}
|
||||
|
||||
if err := s.CreateRefresh(r); err != nil {
|
||||
|
@ -490,7 +490,6 @@ func (s *Server) finalizeLogin(identity connector.Identity, authReq storage.Auth
|
||||
updater := func(a storage.AuthRequest) (storage.AuthRequest, error) {
|
||||
a.LoggedIn = true
|
||||
a.Claims = claims
|
||||
a.ConnectorData = identity.ConnectorData
|
||||
return a, nil
|
||||
}
|
||||
if err := s.storage.UpdateAuthRequest(authReq.ID, updater); err != nil {
|
||||
@ -628,7 +627,6 @@ func (s *Server) sendCodeResponse(w http.ResponseWriter, r *http.Request, authRe
|
||||
Claims: authReq.Claims,
|
||||
Expiry: s.now().Add(time.Minute * 30),
|
||||
RedirectURI: authReq.RedirectURI,
|
||||
ConnectorData: authReq.ConnectorData,
|
||||
}
|
||||
if err := s.storage.CreateAuthCode(code); err != nil {
|
||||
s.logger.Errorf("Failed to create auth code: %v", err)
|
||||
@ -831,7 +829,6 @@ func (s *Server) handleAuthCode(w http.ResponseWriter, r *http.Request, client s
|
||||
Scopes: authCode.Scopes,
|
||||
Claims: authCode.Claims,
|
||||
Nonce: authCode.Nonce,
|
||||
ConnectorData: authCode.ConnectorData,
|
||||
CreatedAt: s.now(),
|
||||
LastUsed: s.now(),
|
||||
}
|
||||
|
@ -182,7 +182,6 @@ type AuthRequest struct {
|
||||
// The connector used to login the user and any data the connector wishes to persists.
|
||||
// Set when the user authenticates.
|
||||
ConnectorID string
|
||||
ConnectorData []byte
|
||||
}
|
||||
|
||||
// AuthCode represents a code which can be exchanged for an OAuth2 token response.
|
||||
@ -214,7 +213,6 @@ type AuthCode struct {
|
||||
|
||||
// Authentication data provided by an upstream source.
|
||||
ConnectorID string
|
||||
ConnectorData []byte
|
||||
Claims Claims
|
||||
|
||||
Expiry time.Time
|
||||
@ -238,7 +236,6 @@ type RefreshToken struct {
|
||||
|
||||
// Authentication data provided by an upstream source.
|
||||
ConnectorID string
|
||||
ConnectorData []byte
|
||||
Claims Claims
|
||||
|
||||
// Scopes present in the initial request. Refresh requests may specify a set
|
||||
|
Reference in New Issue
Block a user