Changed IDP login support in console (#2695)
- Allowed to use External IDP + Built-in IDP at the same time - Added IDP type to IDP listing - Added IDP name when no display name is configured - Changed STS login link into new menu - Cleanup of Operator login strategies Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -7592,6 +7592,9 @@ func init() {
|
||||
},
|
||||
"redirect": {
|
||||
"type": "string"
|
||||
},
|
||||
"serviceType": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -16573,6 +16576,9 @@ func init() {
|
||||
},
|
||||
"redirect": {
|
||||
"type": "string"
|
||||
},
|
||||
"serviceType": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -20,7 +20,9 @@ import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
@@ -186,15 +188,25 @@ func getLoginDetailsResponse(params authApi.LoginDetailParams, openIDProviders o
|
||||
Client: oauth2Client,
|
||||
}
|
||||
|
||||
displayName := "Login with SSO"
|
||||
displayName := fmt.Sprintf("Login with SSO (%s)", name)
|
||||
serviceType := ""
|
||||
|
||||
if provider.DisplayName != "" {
|
||||
displayName = provider.DisplayName
|
||||
}
|
||||
|
||||
if provider.RoleArn != "" {
|
||||
splitRoleArn := strings.Split(provider.RoleArn, ":")
|
||||
|
||||
if len(splitRoleArn) > 2 {
|
||||
serviceType = splitRoleArn[2]
|
||||
}
|
||||
}
|
||||
|
||||
redirectRule := models.RedirectRule{
|
||||
Redirect: identityProvider.GenerateLoginURL(),
|
||||
DisplayName: displayName,
|
||||
ServiceType: serviceType,
|
||||
}
|
||||
|
||||
redirectRules = append(redirectRules, &redirectRule)
|
||||
|
||||
Reference in New Issue
Block a user