@@ -22,7 +22,7 @@ import (
22
22
"errors"
23
23
"fmt"
24
24
"html/template"
25
- "io/ioutil "
25
+ "io"
26
26
"net/http"
27
27
"strings"
28
28
"time"
@@ -40,29 +40,29 @@ import (
40
40
type OIDCAuthConfig struct {
41
41
// --- necessary ---
42
42
// 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"`
44
44
// 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"`
46
46
// 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"`
50
50
// 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"`
54
54
// --- optional ---
55
- HTTPTimeout time.Duration `yaml:"http_timeout,omitempty"`
55
+ HTTPTimeout time.Duration `yaml:"http_timeout,omitempty"`
56
56
// 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"`
58
58
// --- optional ---
59
59
// String claim to use for the username
60
- UserClaim string `yaml:"user_claim,omitempty"`
60
+ UserClaim string `yaml:"user_claim,omitempty"`
61
61
// --- optional ---
62
62
// []string to add as labels.
63
- LabelsClaims []string `yaml:"labels_claims,omitempty"`
63
+ LabelsClaims []string `yaml:"labels_claims,omitempty"`
64
64
// --- optional ---
65
- Scopes []string `yaml:"scopes,omitempty"`
65
+ Scopes []string `yaml:"scopes,omitempty"`
66
66
}
67
67
68
68
// 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
274
274
err = fmt .Errorf ("error talking to OIDC auth backend: %s" , err )
275
275
return
276
276
}
277
- respStr , _ := ioutil .ReadAll (resp .Body )
277
+ respStr , _ := io .ReadAll (resp .Body )
278
278
glog .V (2 ).Infof ("Refresh token resp: %s" , strings .Replace (string (respStr ), "\n " , " " , - 1 ))
279
279
280
280
err = json .Unmarshal (respStr , & rtr )
0 commit comments