web: running pre-commit after merge.
This commit is contained in:
parent
2e16e70342
commit
3c55f076d5
|
@ -2,8 +2,7 @@ import { msg } from "@lit/localize";
|
||||||
import { TemplateResult, html } from "lit";
|
import { TemplateResult, html } from "lit";
|
||||||
|
|
||||||
import type { ProviderModelEnum as ProviderModelEnumType, TypeCreate } from "@goauthentik/api";
|
import type { ProviderModelEnum as ProviderModelEnumType, TypeCreate } from "@goauthentik/api";
|
||||||
import { ProviderModelEnum, ProxyMode,
|
import { ProviderModelEnum, ProxyMode } from "@goauthentik/api";
|
||||||
} from "@goauthentik/api";
|
|
||||||
import type {
|
import type {
|
||||||
LDAPProviderRequest,
|
LDAPProviderRequest,
|
||||||
ModelRequest,
|
ModelRequest,
|
||||||
|
@ -20,7 +19,14 @@ type ProviderRenderer = () => TemplateResult;
|
||||||
|
|
||||||
type ModelConverter = (provider: OneOfProvider) => ModelRequest;
|
type ModelConverter = (provider: OneOfProvider) => ModelRequest;
|
||||||
|
|
||||||
type ProviderType = [string, string, string, ProviderRenderer, ProviderModelEnumType, ModelConverter];
|
type ProviderType = [
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
string,
|
||||||
|
ProviderRenderer,
|
||||||
|
ProviderModelEnumType,
|
||||||
|
ModelConverter,
|
||||||
|
];
|
||||||
|
|
||||||
export type LocalTypeCreate = TypeCreate & {
|
export type LocalTypeCreate = TypeCreate & {
|
||||||
formName: string;
|
formName: string;
|
||||||
|
@ -128,21 +134,28 @@ const _providerModelsTable: ProviderType[] = [
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
function mapProviders([formName, name, description, _, modelName, converter]: ProviderType): LocalTypeCreate {
|
function mapProviders([
|
||||||
|
formName,
|
||||||
|
name,
|
||||||
|
description,
|
||||||
|
_,
|
||||||
|
modelName,
|
||||||
|
converter,
|
||||||
|
]: ProviderType): LocalTypeCreate {
|
||||||
return {
|
return {
|
||||||
formName,
|
formName,
|
||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
component: "",
|
component: "",
|
||||||
modelName,
|
modelName,
|
||||||
converter
|
converter,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const providerModelsList = _providerModelsTable.map(mapProviders);
|
export const providerModelsList = _providerModelsTable.map(mapProviders);
|
||||||
|
|
||||||
export const providerRendererList = new Map<string, ProviderRenderer>(
|
export const providerRendererList = new Map<string, ProviderRenderer>(
|
||||||
_providerModelsTable.map(([modelName, _0, _1, renderer]) => [modelName, renderer])
|
_providerModelsTable.map(([modelName, _0, _1, renderer]) => [modelName, renderer]),
|
||||||
);
|
);
|
||||||
|
|
||||||
export default providerModelsList;
|
export default providerModelsList;
|
||||||
|
|
|
@ -23,7 +23,7 @@ import {
|
||||||
TransactionApplicationRequest,
|
TransactionApplicationRequest,
|
||||||
TransactionApplicationResponse,
|
TransactionApplicationResponse,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
import type { ModelRequest, ResponseError } from "@goauthentik/api";
|
import type { ModelRequest } from "@goauthentik/api";
|
||||||
|
|
||||||
import BasePanel from "../BasePanel";
|
import BasePanel from "../BasePanel";
|
||||||
import providerModelsList from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices";
|
import providerModelsList from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices";
|
||||||
|
@ -113,7 +113,7 @@ export class ApplicationWizardCommitApplication extends BasePanel {
|
||||||
const request: TransactionApplicationRequest = {
|
const request: TransactionApplicationRequest = {
|
||||||
providerModel: providerModel.modelName as ProviderModelType,
|
providerModel: providerModel.modelName as ProviderModelType,
|
||||||
app: cleanApplication(this.wizard.app),
|
app: cleanApplication(this.wizard.app),
|
||||||
provider: providerModel.converter(this.wizard.provider)
|
provider: providerModel.converter(this.wizard.provider),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.send(request);
|
this.send(request);
|
||||||
|
|
|
@ -4,9 +4,9 @@ import BasePanel from "../BasePanel";
|
||||||
import { providerRendererList } from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices";
|
import { providerRendererList } from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices";
|
||||||
import "./ldap/ak-application-wizard-authentication-by-ldap";
|
import "./ldap/ak-application-wizard-authentication-by-ldap";
|
||||||
import "./oauth/ak-application-wizard-authentication-by-oauth";
|
import "./oauth/ak-application-wizard-authentication-by-oauth";
|
||||||
|
import "./proxy/ak-application-wizard-authentication-for-forward-domain-proxy";
|
||||||
import "./proxy/ak-application-wizard-authentication-for-reverse-proxy";
|
import "./proxy/ak-application-wizard-authentication-for-reverse-proxy";
|
||||||
import "./proxy/ak-application-wizard-authentication-for-single-forward-proxy";
|
import "./proxy/ak-application-wizard-authentication-for-single-forward-proxy";
|
||||||
import "./proxy/ak-application-wizard-authentication-for-forward-domain-proxy";
|
|
||||||
import "./radius/ak-application-wizard-authentication-by-radius";
|
import "./radius/ak-application-wizard-authentication-by-radius";
|
||||||
import "./saml/ak-application-wizard-authentication-by-saml-configuration";
|
import "./saml/ak-application-wizard-authentication-by-saml-configuration";
|
||||||
import "./scim/ak-application-wizard-authentication-by-scim";
|
import "./scim/ak-application-wizard-authentication-by-scim";
|
||||||
|
|
|
@ -12,7 +12,7 @@ export class AkForwardDomainProxyApplicationWizardPage extends AkTypeProxyApplic
|
||||||
renderModeDescription() {
|
renderModeDescription() {
|
||||||
return html`<p class="pf-u-mb-xl">
|
return html`<p class="pf-u-mb-xl">
|
||||||
${msg(
|
${msg(
|
||||||
"Use this provider with nginx's auth_request or traefik's forwardAuth. Only a single provider is required per root domain. You can't do per-application authorization, but you don't have to create a provider for each application."
|
"Use this provider with nginx's auth_request or traefik's forwardAuth. Only a single provider is required per root domain. You can't do per-application authorization, but you don't have to create a provider for each application.",
|
||||||
)}
|
)}
|
||||||
</p>
|
</p>
|
||||||
<div class="pf-u-mb-xl">
|
<div class="pf-u-mb-xl">
|
||||||
|
@ -22,7 +22,7 @@ export class AkForwardDomainProxyApplicationWizardPage extends AkTypeProxyApplic
|
||||||
<li>${msg("app1 running on app1.example.com")}</li>
|
<li>${msg("app1 running on app1.example.com")}</li>
|
||||||
</ul>
|
</ul>
|
||||||
${msg(
|
${msg(
|
||||||
"In this case, you'd set the Authentication URL to auth.example.com and Cookie domain to example.com."
|
"In this case, you'd set the Authentication URL to auth.example.com and Cookie domain to example.com.",
|
||||||
)}
|
)}
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,10 @@ export class AkForwardDomainProxyApplicationWizardPage extends AkTypeProxyApplic
|
||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="externalHost"
|
name="externalHost"
|
||||||
label=${msg("External host")}
|
label=${msg("External host")}
|
||||||
value=${ifDefined(this.instance?.externalHost)}
|
value=${ifDefined(this.instance?.externalHost)}
|
||||||
required
|
required
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"The external URL you'll authenticate at. The authentik core server should be reachable under this URL."
|
"The external URL you'll authenticate at. The authentik core server should be reachable under this URL.",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
</ak-text-input>
|
</ak-text-input>
|
||||||
|
@ -45,7 +45,7 @@ value=${ifDefined(this.instance?.externalHost)}
|
||||||
value="${ifDefined(this.instance?.cookieDomain)}"
|
value="${ifDefined(this.instance?.cookieDomain)}"
|
||||||
required
|
required
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"Set this to the domain you wish the authentication to be valid for. Must be a parent domain of the URL above. If you're running applications as app1.domain.tld, app2.domain.tld, set this to 'domain.tld'."
|
"Set this to the domain you wish the authentication to be valid for. Must be a parent domain of the URL above. If you're running applications as app1.domain.tld, app2.domain.tld, set this to 'domain.tld'.",
|
||||||
)}
|
)}
|
||||||
></ak-text-input>
|
></ak-text-input>
|
||||||
`;
|
`;
|
||||||
|
|
Reference in New Issue