/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2026.8.0-rc7 * 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 { PolicyEngineMode } from './PolicyEngineMode'; import { PolicyEngineModeFromJSON, PolicyEngineModeFromJSONTyped, PolicyEngineModeToJSON, PolicyEngineModeToJSONTyped, } from './PolicyEngineMode'; import type { GrantTypeEnum } from './GrantTypeEnum'; import { GrantTypeEnumFromJSON, GrantTypeEnumFromJSONTyped, GrantTypeEnumToJSON, GrantTypeEnumToJSONTyped, } from './GrantTypeEnum'; /** * Serializer for OAuth2DynamicClientRegistration * @export * @interface OAuth2DynamicClientRegistration */ export interface OAuth2DynamicClientRegistration { /** * * @type {string} * @memberof OAuth2DynamicClientRegistration */ readonly pbmUuid: string; /** * * @type {number} * @memberof OAuth2DynamicClientRegistration */ provider: number; /** * Group to assign to automatically created applications. * @type {string} * @memberof OAuth2DynamicClientRegistration */ defaultApplicationGroup?: string; /** * Authorization flow applied to dynamically registered clients. * @type {string} * @memberof OAuth2DynamicClientRegistration */ overrideAuthorizationFlow?: string | null; /** * * @type {string} * @memberof OAuth2DynamicClientRegistration */ overrideInvalidationFlow?: string | null; /** * Scope mappings applied to dynamically registered clients. * @type {Array} * @memberof OAuth2DynamicClientRegistration */ overridePropertyMappings?: Array; /** * Maximum access token validity for registered clients (Format: hours=1;minutes=2;seconds=3). * @type {string} * @memberof OAuth2DynamicClientRegistration */ accessTokenValidity?: string; /** * Maximum refresh token validity for registered clients (Format: hours=1;minutes=2;seconds=3). * @type {string} * @memberof OAuth2DynamicClientRegistration */ refreshTokenValidity?: string; /** * If empty, all grant types are allowed. * @type {Array} * @memberof OAuth2DynamicClientRegistration */ allowedGrantTypes?: Array; /** * * @type {PolicyEngineMode} * @memberof OAuth2DynamicClientRegistration */ policyEngineMode?: PolicyEngineMode; } /** * Check if a given object implements the OAuth2DynamicClientRegistration interface. */ export function instanceOfOAuth2DynamicClientRegistration(value: object): value is OAuth2DynamicClientRegistration { if (!('pbmUuid' in value) || value['pbmUuid'] === undefined) return false; if (!('provider' in value) || value['provider'] === undefined) return false; return true; } export function OAuth2DynamicClientRegistrationFromJSON(json: any): OAuth2DynamicClientRegistration { return OAuth2DynamicClientRegistrationFromJSONTyped(json, false); } export function OAuth2DynamicClientRegistrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuth2DynamicClientRegistration { if (json == null) { return json; } return { 'pbmUuid': json['pbm_uuid'], 'provider': json['provider'], 'defaultApplicationGroup': json['default_application_group'] == null ? undefined : json['default_application_group'], 'overrideAuthorizationFlow': json['override_authorization_flow'] == null ? undefined : json['override_authorization_flow'], 'overrideInvalidationFlow': json['override_invalidation_flow'] == null ? undefined : json['override_invalidation_flow'], 'overridePropertyMappings': json['override_property_mappings'] == null ? undefined : json['override_property_mappings'], 'accessTokenValidity': json['access_token_validity'] == null ? undefined : json['access_token_validity'], 'refreshTokenValidity': json['refresh_token_validity'] == null ? undefined : json['refresh_token_validity'], 'allowedGrantTypes': json['allowed_grant_types'] == null ? undefined : ((json['allowed_grant_types'] as Array).map(GrantTypeEnumFromJSON)), 'policyEngineMode': json['policy_engine_mode'] == null ? undefined : PolicyEngineModeFromJSON(json['policy_engine_mode']), }; } export function OAuth2DynamicClientRegistrationToJSON(json: any): OAuth2DynamicClientRegistration { return OAuth2DynamicClientRegistrationToJSONTyped(json, false); } export function OAuth2DynamicClientRegistrationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'provider': value['provider'], 'default_application_group': value['defaultApplicationGroup'], 'override_authorization_flow': value['overrideAuthorizationFlow'], 'override_invalidation_flow': value['overrideInvalidationFlow'], 'override_property_mappings': value['overridePropertyMappings'], 'access_token_validity': value['accessTokenValidity'], 'refresh_token_validity': value['refreshTokenValidity'], 'allowed_grant_types': value['allowedGrantTypes'] == null ? undefined : ((value['allowedGrantTypes'] as Array).map(GrantTypeEnumToJSON)), 'policy_engine_mode': PolicyEngineModeToJSON(value['policyEngineMode']), }; }