This provides `well know` endpoint for corteza which defines a set of values that can be retrieved by a client in order to self-configure. Added route for `public-keys` which can help a client to determine if the public key is changed since the last time and automatically update itself to use this new information.
74 lines
1.2 KiB
Go
74 lines
1.2 KiB
Go
package settings
|
|
|
|
type (
|
|
Settings struct {
|
|
LocalEnabled bool
|
|
SignupEnabled bool
|
|
EmailConfirmationRequired bool
|
|
PasswordResetEnabled bool
|
|
PasswordCreateEnabled bool
|
|
ExternalEnabled bool
|
|
SplitCredentialsCheck bool
|
|
Providers []Provider
|
|
Saml SAML
|
|
MultiFactor MultiFactor
|
|
}
|
|
|
|
SAML struct {
|
|
Enabled bool
|
|
|
|
// IdP name used on a login form
|
|
Name string
|
|
|
|
// SAML certificate
|
|
Cert string
|
|
|
|
// SAML certificate private key
|
|
Key string
|
|
|
|
// Identity provider hostname
|
|
IDP struct {
|
|
URL string
|
|
|
|
// identifier payload from idp
|
|
IdentName string
|
|
IdentHandle string
|
|
IdentIdentifier string
|
|
}
|
|
}
|
|
|
|
MultiFactor struct {
|
|
EmailOTP EmailOTP
|
|
TOTP TOTP
|
|
}
|
|
|
|
EmailOTP struct {
|
|
// Can users use email for MFA
|
|
Enabled bool
|
|
|
|
// Is MFA with email enforced?
|
|
Enforced bool
|
|
}
|
|
|
|
TOTP struct {
|
|
// Can users use TOTP MFA?
|
|
Enabled bool
|
|
|
|
// Is TOTP MFA enforced?
|
|
Enforced bool
|
|
|
|
// TOTP issuer
|
|
Issuer string
|
|
}
|
|
|
|
Provider struct {
|
|
Handle string
|
|
Label string
|
|
IssuerUrl string
|
|
Key string
|
|
RedirectUrl string
|
|
Secret string
|
|
Scope string
|
|
}
|
|
)
|