From 5fe1647fc73c873e1406a0fadd50945493438eb8 Mon Sep 17 00:00:00 2001 From: Anthony Brandelli Date: Thu, 19 May 2022 22:35:05 -0600 Subject: [PATCH] Fix issues to make the linter happy Signed-off-by: Anthony Brandelli --- connector/oidc/oidc.go | 2 +- connector/oidc/oidc_test.go | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/connector/oidc/oidc.go b/connector/oidc/oidc.go index 78557a5a..b4e67799 100644 --- a/connector/oidc/oidc.go +++ b/connector/oidc/oidc.go @@ -296,7 +296,7 @@ func (c *oidcConnector) createIdentity(ctx context.Context, identity connector.I const subjectClaimKey = "sub" subject, found := claims[subjectClaimKey].(string) if !found { - return identity, fmt.Errorf("missing \"%s\" claim", subjectClaimKey) + return identity, fmt.Errorf("missing \"%s\" claim", subjectClaimKey) } userNameKey := "name" diff --git a/connector/oidc/oidc_test.go b/connector/oidc/oidc_test.go index 66764cd7..d8b30b39 100644 --- a/connector/oidc/oidc_test.go +++ b/connector/oidc/oidc_test.go @@ -453,17 +453,19 @@ func setupServer(tok map[string]interface{}, idTokenDesired bool) (*httptest.Ser json.NewEncoder(w).Encode(&map[string]string{ "access_token": token, "id_token": token, - "token_type": "Bearer"}) + "token_type": "Bearer", + }) } else { json.NewEncoder(w).Encode(&map[string]string{ "access_token": token, - "token_type": "Bearer"}) + "token_type": "Bearer", + }) } }) mux.HandleFunc("/userinfo", func(w http.ResponseWriter, r *http.Request) { 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) {