package web import "git.zb-server.de/ZB-Server/uptimesebi/internal/i18n" // SSOOption is one provider on the chooser page. type SSOOption struct { Name string URL string } templ SSOChooser(p Page, opts []SSOOption) { @authShell(p) {
{ i18n.T(ctx, "auth.signup.to_login") }
} } // SSOProvider is a provider row on the settings page. type SSOProvider struct { ID string Name string Issuer string ClientID string HasSecret bool AllowedDomains string AutoProvision bool DefaultRoleID string Enabled bool } // SSOSettings is the data of the organization SSO page. type SSOSettings struct { Providers []SSOProvider RedirectURL string LoginURL string Roles []Role } templ SSOSettingsPage(p Page, me Me, s SSOSettings) { @consoleShell(p, me) {{ i18n.T(ctx, "sso.settings.intro") }
| { i18n.T(ctx, "sso.field.name") } | { i18n.T(ctx, "sso.field.issuer") } | { i18n.T(ctx, "sso.field.auto_provision") } | { i18n.T(ctx, "sso.field.enabled") } | |
|---|---|---|---|---|
| { pr.Name } | { pr.Issuer } | @yesNo(pr.AutoProvision) | @yesNo(pr.Enabled) |
{ i18n.T(ctx, "sso.action.edit") }
@ssoForm(pr, s.Roles, "put", "/org/sso/"+pr.ID)
|