Skip to content

Commit c4d2dd5

Browse files
committed
Use Operator Creds
1 parent e31fcdc commit c4d2dd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

operatorapi/operator_login.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func getAccountPolicy(ctx context.Context, client restapi.MinioAdmin) (*iampolic
116116

117117
// getConsoleCredentials will return consoleCredentials interface including the associated policy of the current account
118118
func getConsoleCredentials(ctx context.Context, accessKey, secretKey string) (*restapi.ConsoleCredentials, error) {
119-
creds, err := restapi.NewConsoleCredentials(accessKey, secretKey, restapi.GetMinIORegion())
119+
creds, err := newConsoleCredentials(secretKey)
120120
if err != nil {
121121
return nil, err
122122
}
@@ -232,7 +232,7 @@ func newConsoleCredentials(secretKey string) (*credentials.Credentials, error) {
232232

233233
// getLoginOperatorResponse validate the provided service account token against k8s api
234234
func getLoginOperatorResponse(lmr *models.LoginOperatorRequest) (*models.LoginResponse, *models.Error) {
235-
creds, err := restapi.NewConsoleCredentials("", *lmr.Jwt, "")
235+
creds, err := newConsoleCredentials(*lmr.Jwt)
236236
if err != nil {
237237
return nil, prepareError(err)
238238
}

0 commit comments

Comments
 (0)