diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 91916fb290..8f493fd36f 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -187,6 +187,7 @@ SPECTACULAR_SETTINGS = { "PolicyEngineMode": "authentik.policies.models.PolicyEngineMode", "PromptTypeEnum": "authentik.stages.prompt.models.FieldTypes", "ProxyMode": "authentik.providers.proxy.models.ProxyMode", + "RedirectURITypeEnum": "authentik.providers.oauth2.models.RedirectURIType", "SAMLBindingsEnum": "authentik.providers.saml.models.SAMLBindings", "SAMLLogoutMethods": "authentik.providers.saml.models.SAMLLogoutMethods", "SAMLNameIDPolicyEnum": "authentik.sources.saml.models.SAMLNameIDPolicy", diff --git a/packages/client-ts/src/models/RedirectURI.ts b/packages/client-ts/src/models/RedirectURI.ts index 0e5e94881f..3f88cf150f 100644 --- a/packages/client-ts/src/models/RedirectURI.ts +++ b/packages/client-ts/src/models/RedirectURI.ts @@ -14,8 +14,8 @@ import type { MatchingModeEnum } from "./MatchingModeEnum"; import { MatchingModeEnumFromJSON, MatchingModeEnumToJSON } from "./MatchingModeEnum"; -import type { RedirectUriTypeEnum } from "./RedirectUriTypeEnum"; -import { RedirectUriTypeEnumFromJSON, RedirectUriTypeEnumToJSON } from "./RedirectUriTypeEnum"; +import type { RedirectURITypeEnum } from "./RedirectURITypeEnum"; +import { RedirectURITypeEnumFromJSON, RedirectURITypeEnumToJSON } from "./RedirectURITypeEnum"; /** * A single allowed redirect URI entry @@ -37,10 +37,10 @@ export interface RedirectURI { url: string; /** * - * @type {RedirectUriTypeEnum} + * @type {RedirectURITypeEnum} * @memberof RedirectURI */ - redirectUriType?: RedirectUriTypeEnum; + redirectUriType?: RedirectURITypeEnum; } /** @@ -66,7 +66,7 @@ export function RedirectURIFromJSONTyped(json: any, ignoreDiscriminator: boolean redirectUriType: json["redirect_uri_type"] == null ? undefined - : RedirectUriTypeEnumFromJSON(json["redirect_uri_type"]), + : RedirectURITypeEnumFromJSON(json["redirect_uri_type"]), }; } @@ -85,6 +85,6 @@ export function RedirectURIToJSONTyped( return { matching_mode: MatchingModeEnumToJSON(value["matchingMode"]), url: value["url"], - redirect_uri_type: RedirectUriTypeEnumToJSON(value["redirectUriType"]), + redirect_uri_type: RedirectURITypeEnumToJSON(value["redirectUriType"]), }; } diff --git a/packages/client-ts/src/models/RedirectURIRequest.ts b/packages/client-ts/src/models/RedirectURIRequest.ts index 7f4657c391..eab6c83024 100644 --- a/packages/client-ts/src/models/RedirectURIRequest.ts +++ b/packages/client-ts/src/models/RedirectURIRequest.ts @@ -14,8 +14,8 @@ import type { MatchingModeEnum } from "./MatchingModeEnum"; import { MatchingModeEnumFromJSON, MatchingModeEnumToJSON } from "./MatchingModeEnum"; -import type { RedirectUriTypeEnum } from "./RedirectUriTypeEnum"; -import { RedirectUriTypeEnumFromJSON, RedirectUriTypeEnumToJSON } from "./RedirectUriTypeEnum"; +import type { RedirectURITypeEnum } from "./RedirectURITypeEnum"; +import { RedirectURITypeEnumFromJSON, RedirectURITypeEnumToJSON } from "./RedirectURITypeEnum"; /** * A single allowed redirect URI entry @@ -37,10 +37,10 @@ export interface RedirectURIRequest { url: string; /** * - * @type {RedirectUriTypeEnum} + * @type {RedirectURITypeEnum} * @memberof RedirectURIRequest */ - redirectUriType?: RedirectUriTypeEnum; + redirectUriType?: RedirectURITypeEnum; } /** @@ -69,7 +69,7 @@ export function RedirectURIRequestFromJSONTyped( redirectUriType: json["redirect_uri_type"] == null ? undefined - : RedirectUriTypeEnumFromJSON(json["redirect_uri_type"]), + : RedirectURITypeEnumFromJSON(json["redirect_uri_type"]), }; } @@ -88,6 +88,6 @@ export function RedirectURIRequestToJSONTyped( return { matching_mode: MatchingModeEnumToJSON(value["matchingMode"]), url: value["url"], - redirect_uri_type: RedirectUriTypeEnumToJSON(value["redirectUriType"]), + redirect_uri_type: RedirectURITypeEnumToJSON(value["redirectUriType"]), }; } diff --git a/packages/client-ts/src/models/RedirectURITypeEnum.ts b/packages/client-ts/src/models/RedirectURITypeEnum.ts new file mode 100644 index 0000000000..2bcf351d8d --- /dev/null +++ b/packages/client-ts/src/models/RedirectURITypeEnum.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * authentik + * Making authentication simple. + * + * The version of the OpenAPI document: 2026.5.0-rc1 + * 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. + */ + +/** + * + * @export + */ +export const RedirectURITypeEnum = { + Authorization: "authorization", + Logout: "logout", + UnknownDefaultOpenApi: "11184809", +} as const; +export type RedirectURITypeEnum = (typeof RedirectURITypeEnum)[keyof typeof RedirectURITypeEnum]; + +export function instanceOfRedirectURITypeEnum(value: any): boolean { + for (const key in RedirectURITypeEnum) { + if (Object.prototype.hasOwnProperty.call(RedirectURITypeEnum, key)) { + if (RedirectURITypeEnum[key as keyof typeof RedirectURITypeEnum] === value) { + return true; + } + } + } + return false; +} + +export function RedirectURITypeEnumFromJSON(json: any): RedirectURITypeEnum { + return RedirectURITypeEnumFromJSONTyped(json, false); +} + +export function RedirectURITypeEnumFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): RedirectURITypeEnum { + return json as RedirectURITypeEnum; +} + +export function RedirectURITypeEnumToJSON(value?: RedirectURITypeEnum | null): any { + return value as any; +} + +export function RedirectURITypeEnumToJSONTyped( + value: any, + ignoreDiscriminator: boolean, +): RedirectURITypeEnum { + return value as RedirectURITypeEnum; +} diff --git a/packages/client-ts/src/models/RedirectUriTypeEnum.ts b/packages/client-ts/src/models/RedirectUriTypeEnum.ts deleted file mode 100644 index 664e976f3f..0000000000 --- a/packages/client-ts/src/models/RedirectUriTypeEnum.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * authentik - * Making authentication simple. - * - * The version of the OpenAPI document: 2026.5.0-rc1 - * 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. - */ - -/** - * - * @export - */ -export const RedirectUriTypeEnum = { - Authorization: "authorization", - Logout: "logout", - UnknownDefaultOpenApi: "11184809", -} as const; -export type RedirectUriTypeEnum = (typeof RedirectUriTypeEnum)[keyof typeof RedirectUriTypeEnum]; - -export function instanceOfRedirectUriTypeEnum(value: any): boolean { - for (const key in RedirectUriTypeEnum) { - if (Object.prototype.hasOwnProperty.call(RedirectUriTypeEnum, key)) { - if (RedirectUriTypeEnum[key as keyof typeof RedirectUriTypeEnum] === value) { - return true; - } - } - } - return false; -} - -export function RedirectUriTypeEnumFromJSON(json: any): RedirectUriTypeEnum { - return RedirectUriTypeEnumFromJSONTyped(json, false); -} - -export function RedirectUriTypeEnumFromJSONTyped( - json: any, - ignoreDiscriminator: boolean, -): RedirectUriTypeEnum { - return json as RedirectUriTypeEnum; -} - -export function RedirectUriTypeEnumToJSON(value?: RedirectUriTypeEnum | null): any { - return value as any; -} - -export function RedirectUriTypeEnumToJSONTyped( - value: any, - ignoreDiscriminator: boolean, -): RedirectUriTypeEnum { - return value as RedirectUriTypeEnum; -} diff --git a/packages/client-ts/src/models/index.ts b/packages/client-ts/src/models/index.ts index 507a1560bf..da4090a4cf 100644 --- a/packages/client-ts/src/models/index.ts +++ b/packages/client-ts/src/models/index.ts @@ -707,7 +707,7 @@ export * from "./RedirectStageModeEnum"; export * from "./RedirectStageRequest"; export * from "./RedirectURI"; export * from "./RedirectURIRequest"; -export * from "./RedirectUriTypeEnum"; +export * from "./RedirectURITypeEnum"; export * from "./RelatedGroup"; export * from "./RelatedRule"; export * from "./Reputation"; diff --git a/schema.yml b/schema.yml index 282f246bc2..eeecc2fc42 100644 --- a/schema.yml +++ b/schema.yml @@ -53633,7 +53633,7 @@ components: type: string redirect_uri_type: allOf: - - $ref: '#/components/schemas/RedirectUriTypeEnum' + - $ref: '#/components/schemas/RedirectURITypeEnum' default: authorization required: - matching_mode @@ -53649,12 +53649,12 @@ components: minLength: 1 redirect_uri_type: allOf: - - $ref: '#/components/schemas/RedirectUriTypeEnum' + - $ref: '#/components/schemas/RedirectURITypeEnum' default: authorization required: - matching_mode - url - RedirectUriTypeEnum: + RedirectURITypeEnum: enum: - authorization - logout diff --git a/web/src/admin/applications/wizard/steps/SubmitStepOverviewRenderers.ts b/web/src/admin/applications/wizard/steps/SubmitStepOverviewRenderers.ts index 4f5f19b150..c6dc820cf1 100644 --- a/web/src/admin/applications/wizard/steps/SubmitStepOverviewRenderers.ts +++ b/web/src/admin/applications/wizard/steps/SubmitStepOverviewRenderers.ts @@ -18,7 +18,7 @@ import { RACProvider, RadiusProvider, RedirectURI, - RedirectUriTypeEnum, + RedirectURITypeEnum, SAMLProvider, SCIMProvider, WSFederationProvider, @@ -87,7 +87,7 @@ function formatRedirectUris(uris: RedirectURI[] = []) { (${uri.matchingMode === MatchingModeEnum.Strict ? msg("strict") : msg("regexp")}, - ${uri.redirectUriType === RedirectUriTypeEnum.Logout + ${uri.redirectUriType === RedirectURITypeEnum.Logout ? msg("post logout") : msg("authorization")}) `, diff --git a/web/src/admin/providers/oauth2/OAuth2ProviderFormForm.ts b/web/src/admin/providers/oauth2/OAuth2ProviderFormForm.ts index 6836cc5cab..eade8f2c53 100644 --- a/web/src/admin/providers/oauth2/OAuth2ProviderFormForm.ts +++ b/web/src/admin/providers/oauth2/OAuth2ProviderFormForm.ts @@ -36,7 +36,7 @@ import { OAuth2Provider, OAuth2ProviderLogoutMethodEnum, RedirectURI, - RedirectUriTypeEnum, + RedirectURITypeEnum, SubModeEnum, ValidationError, } from "@goauthentik/api"; @@ -270,7 +270,7 @@ export function renderForm({ .newItem=${() => ({ matchingMode: MatchingModeEnum.Strict, url: "", - redirectUriType: RedirectUriTypeEnum.Authorization, + redirectUriType: RedirectURITypeEnum.Authorization, })} .row=${(redirectURI: RedirectURI, idx: number) => { return html` { public redirectURI: RedirectURI = { matchingMode: MatchingModeEnum.Strict, url: "", - redirectUriType: RedirectUriTypeEnum.Authorization, + redirectUriType: RedirectURITypeEnum.Authorization, }; @property({ type: String, useDefault: true }) @@ -89,15 +89,15 @@ export class OAuth2ProviderRedirectURI extends AKControlElement { @change=${onChange} >