import "@goauthentik/admin/common/ak-flow-search/ak-branded-flow-search"; import "@goauthentik/admin/common/ak-flow-search/ak-flow-search"; import { ascii_letters, digits, randomString } from "@goauthentik/common/utils"; import "@goauthentik/components/ak-hidden-text-input"; import "@goauthentik/components/ak-text-input"; import "@goauthentik/elements/forms/FormGroup"; import "@goauthentik/elements/forms/HorizontalFormElement"; import "@goauthentik/elements/forms/SearchSelect"; import { msg } from "@lit/localize"; import { html } from "lit"; import { ifDefined } from "lit/directives/if-defined.js"; import { CurrentBrand, FlowsInstancesListDesignationEnum, RadiusProvider, ValidationError, } from "@goauthentik/api"; import { propertyMappingsProvider, propertyMappingsSelector } from "./RadiusProviderFormHelpers.js"; const mfaSupportHelp = msg( "When enabled, code-based multi-factor authentication can be used by appending a semicolon and the TOTP code to the password. This should only be enabled if all users that will bind to this provider have a TOTP device configured, as otherwise a password may incorrectly be rejected if it contains a semicolon.", ); const clientNetworksHelp = msg( "List of CIDRs (comma-seperated) that clients can connect from. A more specific CIDR will match before a looser one. Clients connecting from a non-specified CIDR will be dropped.", ); // All Provider objects have an Authorization flow, but not all providers have an Authentication // flow. Radius needs only one field, but it is not the Authorization field, it is an // Authentication field. So, yeah, we're using the authorization field to store the // authentication information, which is why the ak-branded-flow-search call down there looks so // weird-- we're looking up Authentication flows, but we're storing them in the Authorization // field of the target Provider. export function renderForm( provider?: Partial, errors: ValidationError = {}, brand?: CurrentBrand, ) { return html`

${msg("Flow used for users to authenticate.")}

${msg("Protocol settings")}
${msg("Advanced flow settings")}

${msg("Flow used when logging out of this provider.")}

`; }