/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * Contact: hello@goauthentik.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { LDAPAPIAccessMode } from './LDAPAPIAccessMode'; import { LDAPAPIAccessModeFromJSON, LDAPAPIAccessModeFromJSONTyped, LDAPAPIAccessModeToJSON, LDAPAPIAccessModeToJSONTyped, } from './LDAPAPIAccessMode'; /** * LDAPProvider Serializer * @export * @interface LDAPProviderRequest */ export interface LDAPProviderRequest { /** * * @type {string} * @memberof LDAPProviderRequest */ name: string; /** * Flow used for authentication when the associated application is accessed by an un-authenticated user. * @type {string} * @memberof LDAPProviderRequest */ authenticationFlow?: string | null; /** * Flow used when authorizing this provider. * @type {string} * @memberof LDAPProviderRequest */ authorizationFlow: string; /** * Flow used ending the session from a provider. * @type {string} * @memberof LDAPProviderRequest */ invalidationFlow: string; /** * * @type {Array} * @memberof LDAPProviderRequest */ propertyMappings?: Array; /** * DN under which objects are accessible. * @type {string} * @memberof LDAPProviderRequest */ baseDn?: string; /** * * @type {string} * @memberof LDAPProviderRequest */ certificate?: string | null; /** * * @type {string} * @memberof LDAPProviderRequest */ tlsServerName?: string; /** * The start for uidNumbers, this number is added to the user.pk to make sure that the numbers aren't too low for POSIX users. Default is 2000 to ensure that we don't collide with local users uidNumber * @type {number} * @memberof LDAPProviderRequest */ uidStartNumber?: number; /** * The start for gidNumbers, this number is added to a number generated from the group.pk to make sure that the numbers aren't too low for POSIX groups. Default is 4000 to ensure that we don't collide with local groups or users primary groups gidNumber * @type {number} * @memberof LDAPProviderRequest */ gidStartNumber?: number; /** * * @type {LDAPAPIAccessMode} * @memberof LDAPProviderRequest */ searchMode?: LDAPAPIAccessMode; /** * * @type {LDAPAPIAccessMode} * @memberof LDAPProviderRequest */ bindMode?: LDAPAPIAccessMode; /** * 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. * @type {boolean} * @memberof LDAPProviderRequest */ mfaSupport?: boolean; } /** * Check if a given object implements the LDAPProviderRequest interface. */ export function instanceOfLDAPProviderRequest(value: object): value is LDAPProviderRequest { if (!('name' in value) || value['name'] === undefined) return false; if (!('authorizationFlow' in value) || value['authorizationFlow'] === undefined) return false; if (!('invalidationFlow' in value) || value['invalidationFlow'] === undefined) return false; return true; } export function LDAPProviderRequestFromJSON(json: any): LDAPProviderRequest { return LDAPProviderRequestFromJSONTyped(json, false); } export function LDAPProviderRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): LDAPProviderRequest { if (json == null) { return json; } return { 'name': json['name'], 'authenticationFlow': json['authentication_flow'] == null ? undefined : json['authentication_flow'], 'authorizationFlow': json['authorization_flow'], 'invalidationFlow': json['invalidation_flow'], 'propertyMappings': json['property_mappings'] == null ? undefined : json['property_mappings'], 'baseDn': json['base_dn'] == null ? undefined : json['base_dn'], 'certificate': json['certificate'] == null ? undefined : json['certificate'], 'tlsServerName': json['tls_server_name'] == null ? undefined : json['tls_server_name'], 'uidStartNumber': json['uid_start_number'] == null ? undefined : json['uid_start_number'], 'gidStartNumber': json['gid_start_number'] == null ? undefined : json['gid_start_number'], 'searchMode': json['search_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['search_mode']), 'bindMode': json['bind_mode'] == null ? undefined : LDAPAPIAccessModeFromJSON(json['bind_mode']), 'mfaSupport': json['mfa_support'] == null ? undefined : json['mfa_support'], }; } export function LDAPProviderRequestToJSON(json: any): LDAPProviderRequest { return LDAPProviderRequestToJSONTyped(json, false); } export function LDAPProviderRequestToJSONTyped(value?: LDAPProviderRequest | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'authentication_flow': value['authenticationFlow'], 'authorization_flow': value['authorizationFlow'], 'invalidation_flow': value['invalidationFlow'], 'property_mappings': value['propertyMappings'], 'base_dn': value['baseDn'], 'certificate': value['certificate'], 'tls_server_name': value['tlsServerName'], 'uid_start_number': value['uidStartNumber'], 'gid_start_number': value['gidStartNumber'], 'search_mode': LDAPAPIAccessModeToJSON(value['searchMode']), 'bind_mode': LDAPAPIAccessModeToJSON(value['bindMode']), 'mfa_support': value['mfaSupport'], }; }