spelling: register
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
This commit is contained in:
		@@ -353,7 +353,7 @@ func (m *UpdateClientReq) GetLogoUrl() string {
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateClientResp returns the reponse from updating a client.
 | 
			
		||||
// UpdateClientResp returns the response from updating a client.
 | 
			
		||||
type UpdateClientResp struct {
 | 
			
		||||
	NotFound             bool     `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"`
 | 
			
		||||
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 | 
			
		||||
 
 | 
			
		||||
@@ -45,7 +45,7 @@ message UpdateClientReq {
 | 
			
		||||
    string logo_url = 5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateClientResp returns the reponse from updating a client.
 | 
			
		||||
// UpdateClientResp returns the response from updating a client.
 | 
			
		||||
message UpdateClientResp {
 | 
			
		||||
    bool not_found = 1;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -353,7 +353,7 @@ func (m *UpdateClientReq) GetLogoUrl() string {
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateClientResp returns the reponse from updating a client.
 | 
			
		||||
// UpdateClientResp returns the response from updating a client.
 | 
			
		||||
type UpdateClientResp struct {
 | 
			
		||||
	NotFound             bool     `protobuf:"varint,1,opt,name=not_found,json=notFound,proto3" json:"not_found,omitempty"`
 | 
			
		||||
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 | 
			
		||||
 
 | 
			
		||||
@@ -45,7 +45,7 @@ message UpdateClientReq {
 | 
			
		||||
    string logo_url = 5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateClientResp returns the reponse from updating a client.
 | 
			
		||||
// UpdateClientResp returns the response from updating a client.
 | 
			
		||||
message UpdateClientResp {
 | 
			
		||||
    bool not_found = 1;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -855,7 +855,7 @@ func (s *Server) handleAuthCode(w http.ResponseWriter, r *http.Request, client s
 | 
			
		||||
	s.writeAccessToken(w, tokenResponse)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *Server) exchangeAuthCode(w http.ResponseWriter, authCode storage.AuthCode, client storage.Client) (*accessTokenReponse, error) {
 | 
			
		||||
func (s *Server) exchangeAuthCode(w http.ResponseWriter, authCode storage.AuthCode, client storage.Client) (*accessTokenResponse, error) {
 | 
			
		||||
	accessToken, err := s.newAccessToken(client.ID, authCode.Claims, authCode.Scopes, authCode.Nonce, authCode.ConnectorID)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		s.logger.Errorf("failed to create new access token: %v", err)
 | 
			
		||||
@@ -1449,7 +1449,7 @@ func (s *Server) handlePasswordGrant(w http.ResponseWriter, r *http.Request, cli
 | 
			
		||||
	s.writeAccessToken(w, resp)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type accessTokenReponse struct {
 | 
			
		||||
type accessTokenResponse struct {
 | 
			
		||||
	AccessToken  string `json:"access_token"`
 | 
			
		||||
	TokenType    string `json:"token_type"`
 | 
			
		||||
	ExpiresIn    int    `json:"expires_in"`
 | 
			
		||||
@@ -1457,8 +1457,8 @@ type accessTokenReponse struct {
 | 
			
		||||
	IDToken      string `json:"id_token"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *Server) toAccessTokenResponse(idToken, accessToken, refreshToken string, expiry time.Time) *accessTokenReponse {
 | 
			
		||||
	return &accessTokenReponse{
 | 
			
		||||
func (s *Server) toAccessTokenResponse(idToken, accessToken, refreshToken string, expiry time.Time) *accessTokenResponse {
 | 
			
		||||
	return &accessTokenResponse{
 | 
			
		||||
		accessToken,
 | 
			
		||||
		"bearer",
 | 
			
		||||
		int(expiry.Sub(s.now()).Seconds()),
 | 
			
		||||
@@ -1467,7 +1467,7 @@ func (s *Server) toAccessTokenResponse(idToken, accessToken, refreshToken string
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *Server) writeAccessToken(w http.ResponseWriter, resp *accessTokenReponse) {
 | 
			
		||||
func (s *Server) writeAccessToken(w http.ResponseWriter, resp *accessTokenResponse) {
 | 
			
		||||
	data, err := json.Marshal(resp)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		s.logger.Errorf("failed to marshal access token response: %v", err)
 | 
			
		||||
 
 | 
			
		||||
@@ -721,7 +721,7 @@ func TestOAuth2CodeFlow(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
			defer oauth2Client.Close()
 | 
			
		||||
 | 
			
		||||
			// Regester the client above with dex.
 | 
			
		||||
			// Register the client above with dex.
 | 
			
		||||
			redirectURL := oauth2Client.URL + "/callback"
 | 
			
		||||
			client := storage.Client{
 | 
			
		||||
				ID:           clientID,
 | 
			
		||||
@@ -1560,7 +1560,7 @@ func TestOAuth2DeviceFlow(t *testing.T) {
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Parse the response
 | 
			
		||||
			var tokenRes accessTokenReponse
 | 
			
		||||
			var tokenRes accessTokenResponse
 | 
			
		||||
			if err := json.Unmarshal(responseBody, &tokenRes); err != nil {
 | 
			
		||||
				t.Errorf("Unexpected Device Access Token Response Format %v", string(responseBody))
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user