Merge pull request #767 from rithujohn191/fix-refresh
storage: Add ConnectorData to storage RefreshToken.
This commit is contained in:
		@@ -219,6 +219,7 @@ func testRefreshTokenCRUD(t *testing.T, s storage.Storage) {
 | 
				
			|||||||
			EmailVerified: true,
 | 
								EmailVerified: true,
 | 
				
			||||||
			Groups:        []string{"a", "b"},
 | 
								Groups:        []string{"a", "b"},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							ConnectorData: []byte(`{"some":"data"}`),
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if err := s.CreateRefresh(refresh); err != nil {
 | 
						if err := s.CreateRefresh(refresh); err != nil {
 | 
				
			||||||
		t.Fatalf("create refresh token: %v", err)
 | 
							t.Fatalf("create refresh token: %v", err)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -167,6 +167,7 @@ func (cli *client) CreateRefresh(r storage.RefreshToken) error {
 | 
				
			|||||||
		Scopes:        r.Scopes,
 | 
							Scopes:        r.Scopes,
 | 
				
			||||||
		Nonce:         r.Nonce,
 | 
							Nonce:         r.Nonce,
 | 
				
			||||||
		Claims:        fromStorageClaims(r.Claims),
 | 
							Claims:        fromStorageClaims(r.Claims),
 | 
				
			||||||
 | 
							ConnectorData: r.ConnectorData,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return cli.post(resourceRefreshToken, refresh)
 | 
						return cli.post(resourceRefreshToken, refresh)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -249,6 +250,7 @@ func (cli *client) GetRefresh(id string) (storage.RefreshToken, error) {
 | 
				
			|||||||
		Scopes:        r.Scopes,
 | 
							Scopes:        r.Scopes,
 | 
				
			||||||
		Nonce:         r.Nonce,
 | 
							Nonce:         r.Nonce,
 | 
				
			||||||
		Claims:        toStorageClaims(r.Claims),
 | 
							Claims:        toStorageClaims(r.Claims),
 | 
				
			||||||
 | 
							ConnectorData: r.ConnectorData,
 | 
				
			||||||
	}, nil
 | 
						}, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -369,6 +369,7 @@ type RefreshToken struct {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	Claims        Claims `json:"claims,omitempty"`
 | 
						Claims        Claims `json:"claims,omitempty"`
 | 
				
			||||||
	ConnectorID   string `json:"connectorID,omitempty"`
 | 
						ConnectorID   string `json:"connectorID,omitempty"`
 | 
				
			||||||
 | 
						ConnectorData []byte `json:"connectorData,omitempty"`
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// RefreshList is a list of refresh tokens.
 | 
					// RefreshList is a list of refresh tokens.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user