Changed SSO Login screen to hide login form by default (#2807)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -7029,9 +7029,6 @@ func init() {
|
||||
"animatedLogin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isDirectPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isK8S": {
|
||||
"type": "boolean"
|
||||
},
|
||||
@@ -16163,9 +16160,6 @@ func init() {
|
||||
"animatedLogin": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isDirectPV": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isK8S": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
@@ -24,6 +24,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/minio/console/models"
|
||||
@@ -89,6 +91,7 @@ func login(credentials ConsoleCredentialsI, sessionFeatures *auth.SessionFeature
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// if we made it here, the consoleCredentials work, generate a jwt with claims
|
||||
token, err := auth.NewEncryptedTokenForClient(&tokens, credentials.GetAccountAccessKey(), sessionFeatures)
|
||||
if err != nil {
|
||||
@@ -133,6 +136,13 @@ func getLoginResponse(params authApi.LoginParams) (*models.LoginResponse, *model
|
||||
ConsoleCredentials: creds,
|
||||
AccountAccessKey: lr.AccessKey,
|
||||
}
|
||||
|
||||
credsVerificate, _ := creds.Get()
|
||||
|
||||
if credsVerificate.SessionToken == "" || credsVerificate.SecretAccessKey == "" || credsVerificate.AccessKeyID == "" {
|
||||
return nil, ErrorWithContext(ctx, errors.New(401, "Invalid STS Params"))
|
||||
}
|
||||
|
||||
} else {
|
||||
// prepare console credentials
|
||||
consoleCreds, err = getConsoleCredentials(lr.AccessKey, lr.SecretKey)
|
||||
|
||||
Reference in New Issue
Block a user