mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
fix(login): correct rendering of idps (#7151)
This commit is contained in:
parent
a5d4b08a99
commit
1f30776fc2
@ -66,6 +66,13 @@ func (p IDPProvider) IsValid() bool {
|
|||||||
return p.IDPConfigID != ""
|
return p.IDPConfigID != ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DisplayName returns the name or a default
|
||||||
|
// It's used for html rendering
|
||||||
|
// to be used when always a name must be displayed (e.g. login)
|
||||||
|
func (p IDPProvider) DisplayName() string {
|
||||||
|
return IDPName(p.Name, p.IDPType)
|
||||||
|
}
|
||||||
|
|
||||||
type PasswordlessType int32
|
type PasswordlessType int32
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -79,6 +86,12 @@ func (f PasswordlessType) Valid() bool {
|
|||||||
return f >= 0 && f < passwordlessCount
|
return f >= 0 && f < passwordlessCount
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HasSecondFactors is used in html rendering
|
||||||
func (p *LoginPolicy) HasSecondFactors() bool {
|
func (p *LoginPolicy) HasSecondFactors() bool {
|
||||||
return len(p.SecondFactors) > 0
|
return len(p.SecondFactors) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HasMultiFactors is used in html rendering
|
||||||
|
func (p *LoginPolicy) HasMultiFactors() bool {
|
||||||
|
return len(p.MultiFactors) > 0
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user