Skip to content
Snippets Groups Projects
Commit 5fe1647f authored by Anthony Brandelli's avatar Anthony Brandelli
Browse files

Fix issues to make the linter happy

parent 7c335e93
No related branches found
No related tags found
No related merge requests found
...@@ -296,7 +296,7 @@ func (c *oidcConnector) createIdentity(ctx context.Context, identity connector.I ...@@ -296,7 +296,7 @@ func (c *oidcConnector) createIdentity(ctx context.Context, identity connector.I
const subjectClaimKey = "sub" const subjectClaimKey = "sub"
subject, found := claims[subjectClaimKey].(string) subject, found := claims[subjectClaimKey].(string)
if !found { if !found {
return identity, fmt.Errorf("missing \"%s\" claim", subjectClaimKey) return identity, fmt.Errorf("missing \"%s\" claim", subjectClaimKey)
} }
userNameKey := "name" userNameKey := "name"
......
...@@ -453,17 +453,19 @@ func setupServer(tok map[string]interface{}, idTokenDesired bool) (*httptest.Ser ...@@ -453,17 +453,19 @@ func setupServer(tok map[string]interface{}, idTokenDesired bool) (*httptest.Ser
json.NewEncoder(w).Encode(&map[string]string{ json.NewEncoder(w).Encode(&map[string]string{
"access_token": token, "access_token": token,
"id_token": token, "id_token": token,
"token_type": "Bearer"}) "token_type": "Bearer",
})
} else { } else {
json.NewEncoder(w).Encode(&map[string]string{ json.NewEncoder(w).Encode(&map[string]string{
"access_token": token, "access_token": token,
"token_type": "Bearer"}) "token_type": "Bearer",
})
} }
}) })
mux.HandleFunc("/userinfo", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/userinfo", func(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Content-Type", "application/json") w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(tok) json.NewEncoder(w).Encode(tok)
}) })
mux.HandleFunc("/.well-known/openid-configuration", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/.well-known/openid-configuration", func(w http.ResponseWriter, r *http.Request) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment