mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
feat(login): use new IDP templates (#5315)
The login uses the new template based IDPs with backwards compatibility for old IDPs
This commit is contained in:
@@ -34,3 +34,12 @@ const (
|
||||
IDPTypeGitLabSelfHosted
|
||||
IDPTypeGoogle
|
||||
)
|
||||
|
||||
func (t IDPType) GetCSSClass() string {
|
||||
switch t { //nolint:exhaustive
|
||||
case IDPTypeGoogle:
|
||||
return "google"
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
@@ -69,6 +69,8 @@ type JWTIDPConfig struct {
|
||||
HeaderName string
|
||||
}
|
||||
|
||||
// IDPConfigType
|
||||
// Deprecated: use [IDPType]
|
||||
type IDPConfigType int32
|
||||
|
||||
const (
|
||||
@@ -85,6 +87,8 @@ func (f IDPConfigType) Valid() bool {
|
||||
return f >= 0 && f < idpConfigTypeCount
|
||||
}
|
||||
|
||||
// IDPConfigState
|
||||
// Deprecated: use [IDPStateType]
|
||||
type IDPConfigState int32
|
||||
|
||||
const (
|
||||
@@ -104,6 +108,8 @@ func (s IDPConfigState) Exists() bool {
|
||||
return s != IDPConfigStateUnspecified && s != IDPConfigStateRemoved
|
||||
}
|
||||
|
||||
// IDPConfigStylingType
|
||||
// Deprecated: use a concrete provider
|
||||
type IDPConfigStylingType int32
|
||||
|
||||
const (
|
||||
|
@@ -55,10 +55,10 @@ type IDPProvider struct {
|
||||
Type IdentityProviderType
|
||||
IDPConfigID string
|
||||
|
||||
Name string
|
||||
StylingType IDPConfigStylingType
|
||||
IDPConfigType IDPConfigType
|
||||
IDPState IDPConfigState
|
||||
Name string
|
||||
StylingType IDPConfigStylingType // deprecated
|
||||
IDPType IDPType
|
||||
IDPState IDPConfigState
|
||||
}
|
||||
|
||||
func (p IDPProvider) IsValid() bool {
|
||||
|
Reference in New Issue
Block a user