@@ -22,7 +22,7 @@ import (
2222 "errors"
2323 "fmt"
2424 "html/template"
25- "io/ioutil "
25+ "io"
2626 "net/http"
2727 "strings"
2828 "time"
@@ -40,29 +40,29 @@ import (
4040type OIDCAuthConfig struct {
4141 // --- necessary ---
4242 // URL of the authentication provider. Must be able to serve the /.well-known/openid-configuration
43- Issuer string `yaml:"issuer,omitempty"`
43+ Issuer string `yaml:"issuer,omitempty"`
4444 // URL of the auth server. Has to end with /oidc_auth
45- RedirectURL string `yaml:"redirect_url,omitempty"`
45+ RedirectURL string `yaml:"redirect_url,omitempty"`
4646 // ID and secret, priovided by the OIDC provider after registration of the auth server
47- ClientId string `yaml:"client_id,omitempty"`
48- ClientSecret string `yaml:"client_secret,omitempty"`
49- ClientSecretFile string `yaml:"client_secret_file,omitempty"`
47+ ClientId string `yaml:"client_id,omitempty"`
48+ ClientSecret string `yaml:"client_secret,omitempty"`
49+ ClientSecretFile string `yaml:"client_secret_file,omitempty"`
5050 // path where the tokendb should be stored within the container
51- LevelTokenDB * LevelDBStoreConfig `yaml:"level_token_db,omitempty"`
52- GCSTokenDB * GCSStoreConfig `yaml:"gcs_token_db,omitempty"`
53- RedisTokenDB * RedisStoreConfig `yaml:"redis_token_db,omitempty"`
51+ LevelTokenDB * LevelDBStoreConfig `yaml:"level_token_db,omitempty"`
52+ GCSTokenDB * GCSStoreConfig `yaml:"gcs_token_db,omitempty"`
53+ RedisTokenDB * RedisStoreConfig `yaml:"redis_token_db,omitempty"`
5454 // --- optional ---
55- HTTPTimeout time.Duration `yaml:"http_timeout,omitempty"`
55+ HTTPTimeout time.Duration `yaml:"http_timeout,omitempty"`
5656 // the URL of the docker registry. Used to generate a full docker login command after authentication
57- RegistryURL string `yaml:"registry_url,omitempty"`
57+ RegistryURL string `yaml:"registry_url,omitempty"`
5858 // --- optional ---
5959 // String claim to use for the username
60- UserClaim string `yaml:"user_claim,omitempty"`
60+ UserClaim string `yaml:"user_claim,omitempty"`
6161 // --- optional ---
6262 // []string to add as labels.
63- LabelsClaims []string `yaml:"labels_claims,omitempty"`
63+ LabelsClaims []string `yaml:"labels_claims,omitempty"`
6464 // --- optional ---
65- Scopes []string `yaml:"scopes,omitempty"`
65+ Scopes []string `yaml:"scopes,omitempty"`
6666}
6767
6868// OIDCRefreshTokenResponse is sent by OIDC provider in response to the grant_type=refresh_token request.
@@ -274,7 +274,7 @@ func (ga *OIDCAuth) refreshAccessToken(refreshToken string) (rtr OIDCRefreshToke
274274 err = fmt .Errorf ("error talking to OIDC auth backend: %s" , err )
275275 return
276276 }
277- respStr , _ := ioutil .ReadAll (resp .Body )
277+ respStr , _ := io .ReadAll (resp .Body )
278278 glog .V (2 ).Infof ("Refresh token resp: %s" , strings .Replace (string (respStr ), "\n " , " " , - 1 ))
279279
280280 err = json .Unmarshal (respStr , & rtr )
0 commit comments