@@ -51,17 +51,17 @@ type realConnector struct {
51
51
flow oauthflow.TokenGetter
52
52
}
53
53
54
- func (rf * realConnector ) OIDConnect (url , clientID , secret , redirectURI string ) (* oauthflow.OIDCIDToken , error ) {
55
- return oauthflow .OIDConnect (url , clientID , secret , redirectURI , rf .flow )
54
+ func (rf * realConnector ) OIDConnect (url , clientID , secret , redirectURL string ) (* oauthflow.OIDCIDToken , error ) {
55
+ return oauthflow .OIDConnect (url , clientID , secret , redirectURL , rf .flow )
56
56
}
57
57
58
- func getCertForOauthID (priv * ecdsa.PrivateKey , fc api.Client , connector oidcConnector , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURI string ) (* api.CertificateResponse , error ) {
58
+ func getCertForOauthID (priv * ecdsa.PrivateKey , fc api.Client , connector oidcConnector , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURL string ) (* api.CertificateResponse , error ) {
59
59
pubBytes , err := x509 .MarshalPKIXPublicKey (& priv .PublicKey )
60
60
if err != nil {
61
61
return nil , err
62
62
}
63
63
64
- tok , err := connector .OIDConnect (oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURI )
64
+ tok , err := connector .OIDConnect (oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURL )
65
65
if err != nil {
66
66
return nil , err
67
67
}
@@ -85,7 +85,7 @@ func getCertForOauthID(priv *ecdsa.PrivateKey, fc api.Client, connector oidcConn
85
85
}
86
86
87
87
// GetCert returns the PEM-encoded signature of the OIDC identity returned as part of an interactive oauth2 flow plus the PEM-encoded cert chain.
88
- func GetCert (ctx context.Context , priv * ecdsa.PrivateKey , idToken , flow , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURI string , fClient api.Client ) (* api.CertificateResponse , error ) {
88
+ func GetCert (ctx context.Context , priv * ecdsa.PrivateKey , idToken , flow , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURL string , fClient api.Client ) (* api.CertificateResponse , error ) {
89
89
c := & realConnector {}
90
90
switch flow {
91
91
case FlowDevice :
@@ -99,7 +99,7 @@ func GetCert(ctx context.Context, priv *ecdsa.PrivateKey, idToken, flow, oidcIss
99
99
return nil , fmt .Errorf ("unsupported oauth flow: %s" , flow )
100
100
}
101
101
102
- return getCertForOauthID (priv , fClient , c , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURI )
102
+ return getCertForOauthID (priv , fClient , c , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURL )
103
103
}
104
104
105
105
type Signer struct {
@@ -110,7 +110,7 @@ type Signer struct {
110
110
* signature.ECDSASignerVerifier
111
111
}
112
112
113
- func NewSigner (ctx context.Context , idToken , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURI string , fClient api.Client ) (* Signer , error ) {
113
+ func NewSigner (ctx context.Context , idToken , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURL string , fClient api.Client ) (* Signer , error ) {
114
114
priv , err := cosign .GeneratePrivateKey ()
115
115
if err != nil {
116
116
return nil , errors .Wrap (err , "generating cert" )
@@ -131,7 +131,7 @@ func NewSigner(ctx context.Context, idToken, oidcIssuer, oidcClientID, oidcClien
131
131
default :
132
132
flow = FlowNormal
133
133
}
134
- Resp , err := GetCert (ctx , priv , idToken , flow , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURI , fClient ) // TODO, use the chain.
134
+ Resp , err := GetCert (ctx , priv , idToken , flow , oidcIssuer , oidcClientID , oidcClientSecret , oidcRedirectURL , fClient ) // TODO, use the chain.
135
135
if err != nil {
136
136
return nil , errors .Wrap (err , "retrieving cert" )
137
137
}
0 commit comments