Compare commits
77 Commits
openapi-ge
...
manualdeps
Author | SHA1 | Date | |
---|---|---|---|
acc7ed2744 | |||
b448e76db4 | |||
f2937bd6dd | |||
53c2e3e77c | |||
7dd62c1f55 | |||
33e3510fba | |||
0e5fac2642 | |||
c53b1fe78a | |||
838a7457b2 | |||
a3c07bc9ff | |||
121f2c609d | |||
365affc28e | |||
f367822779 | |||
848198125d | |||
497ac5e3d0 | |||
1773d4d681 | |||
4edbb51939 | |||
c7e97ab48e | |||
31f7faae1c | |||
f5dae2ae92 | |||
2c043dba0b | |||
bda10e5db1 | |||
be9ae7d4f7 | |||
b4a6189bfa | |||
bfdb827ff9 | |||
488a58e1c5 | |||
3f83e69453 | |||
e92fa5df0b | |||
f8c22170df | |||
e3d08a8434 | |||
97d3e9afdc | |||
1eb08def73 | |||
6e3b379e4a | |||
264f59775c | |||
d048f1ecbd | |||
eb31f31584 | |||
fe5c842e92 | |||
b82d3100c9 | |||
49bb668036 | |||
52c70c7700 | |||
b99fd36f86 | |||
8a5381eca3 | |||
2c77830179 | |||
ffcd7def60 | |||
ed121bc2a3 | |||
d5ab9d9167 | |||
a983321ad6 | |||
9c3420ede4 | |||
91b40350aa | |||
1912991682 | |||
71b9117f53 | |||
b5f947f460 | |||
3a2f7e9549 | |||
1582ce0920 | |||
6d3eea5266 | |||
e987208bd1 | |||
0efab8eef7 | |||
9402dac8ae | |||
f57a290eee | |||
5dab0d2b7a | |||
2da6036248 | |||
cdba94cea4 | |||
c59eca664a | |||
d5b205f9c0 | |||
8ad9ad833e | |||
599ce15f68 | |||
91310eff52 | |||
b522d6732a | |||
17d96f204e | |||
65e4667bc3 | |||
f67f9e5ed0 | |||
62dd6a4393 | |||
a46eae8276 | |||
c4acc9fc24 | |||
e748a03082 | |||
e473f28e21 | |||
f70635c295 |
2
.github/workflows/ci-outpost.yml
vendored
2
.github/workflows/ci-outpost.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: Generate API
|
- name: Generate API
|
||||||
run: make gen-client-go
|
run: make gen-client-go
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@v7
|
uses: golangci/golangci-lint-action@v8
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: --timeout 5000s --verbose
|
args: --timeout 5000s --verbose
|
||||||
|
@ -85,18 +85,17 @@ FROM --platform=${BUILDPLATFORM} ghcr.io/maxmind/geoipupdate:v7.1.0 AS geoip
|
|||||||
ENV GEOIPUPDATE_EDITION_IDS="GeoLite2-City GeoLite2-ASN"
|
ENV GEOIPUPDATE_EDITION_IDS="GeoLite2-City GeoLite2-ASN"
|
||||||
ENV GEOIPUPDATE_VERBOSE="1"
|
ENV GEOIPUPDATE_VERBOSE="1"
|
||||||
ENV GEOIPUPDATE_ACCOUNT_ID_FILE="/run/secrets/GEOIPUPDATE_ACCOUNT_ID"
|
ENV GEOIPUPDATE_ACCOUNT_ID_FILE="/run/secrets/GEOIPUPDATE_ACCOUNT_ID"
|
||||||
ENV GEOIPUPDATE_LICENSE_KEY_FILE="/run/secrets/GEOIPUPDATE_LICENSE_KEY"
|
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
RUN --mount=type=secret,id=GEOIPUPDATE_ACCOUNT_ID \
|
RUN --mount=type=secret,id=GEOIPUPDATE_ACCOUNT_ID \
|
||||||
--mount=type=secret,id=GEOIPUPDATE_LICENSE_KEY \
|
--mount=type=secret,id=GEOIPUPDATE_LICENSE_KEY \
|
||||||
mkdir -p /usr/share/GeoIP && \
|
mkdir -p /usr/share/GeoIP && \
|
||||||
/bin/sh -c "/usr/bin/entry.sh || echo 'Failed to get GeoIP database, disabling'; exit 0"
|
/bin/sh -c "GEOIPUPDATE_LICENSE_KEY_FILE=/run/secrets/GEOIPUPDATE_LICENSE_KEY /usr/bin/entry.sh || echo 'Failed to get GeoIP database, disabling'; exit 0"
|
||||||
|
|
||||||
# Stage 5: Download uv
|
# Stage 5: Download uv
|
||||||
FROM ghcr.io/astral-sh/uv:0.7.2 AS uv
|
FROM ghcr.io/astral-sh/uv:0.7.3 AS uv
|
||||||
# Stage 6: Base python image
|
# Stage 6: Base python image
|
||||||
FROM ghcr.io/goauthentik/fips-python:3.12.10-slim-bookworm-fips AS python-base
|
FROM ghcr.io/goauthentik/fips-python:3.13.3-slim-bookworm-fips AS python-base
|
||||||
|
|
||||||
ENV VENV_PATH="/ak-root/.venv" \
|
ENV VENV_PATH="/ak-root/.venv" \
|
||||||
PATH="/lifecycle:/ak-root/.venv/bin:$PATH" \
|
PATH="/lifecycle:/ak-root/.venv/bin:$PATH" \
|
||||||
|
94
Makefile
94
Makefile
@ -1,7 +1,6 @@
|
|||||||
.PHONY: gen dev-reset all clean test web website
|
.PHONY: gen dev-reset all clean test web website
|
||||||
|
|
||||||
SHELL := /usr/bin/env bash
|
.SHELLFLAGS += ${SHELLFLAGS} -e
|
||||||
.SHELLFLAGS += ${SHELLFLAGS} -e -o pipefail
|
|
||||||
PWD = $(shell pwd)
|
PWD = $(shell pwd)
|
||||||
UID = $(shell id -u)
|
UID = $(shell id -u)
|
||||||
GID = $(shell id -g)
|
GID = $(shell id -g)
|
||||||
@ -9,9 +8,9 @@ NPM_VERSION = $(shell python -m scripts.generate_semver)
|
|||||||
PY_SOURCES = authentik tests scripts lifecycle .github
|
PY_SOURCES = authentik tests scripts lifecycle .github
|
||||||
DOCKER_IMAGE ?= "authentik:test"
|
DOCKER_IMAGE ?= "authentik:test"
|
||||||
|
|
||||||
GEN_API_TS = gen-ts-api
|
GEN_API_TS = "gen-ts-api"
|
||||||
GEN_API_PY = gen-py-api
|
GEN_API_PY = "gen-py-api"
|
||||||
GEN_API_GO = gen-go-api
|
GEN_API_GO = "gen-go-api"
|
||||||
|
|
||||||
pg_user := $(shell uv run python -m authentik.lib.config postgresql.user 2>/dev/null)
|
pg_user := $(shell uv run python -m authentik.lib.config postgresql.user 2>/dev/null)
|
||||||
pg_host := $(shell uv run python -m authentik.lib.config postgresql.host 2>/dev/null)
|
pg_host := $(shell uv run python -m authentik.lib.config postgresql.host 2>/dev/null)
|
||||||
@ -118,45 +117,63 @@ gen-diff: ## (Release) generate the changelog diff between the current schema a
|
|||||||
npx prettier --write diff.md
|
npx prettier --write diff.md
|
||||||
|
|
||||||
gen-clean-ts: ## Remove generated API client for Typescript
|
gen-clean-ts: ## Remove generated API client for Typescript
|
||||||
rm -rf ${PWD}/${GEN_API_TS}/
|
rm -rf ./${GEN_API_TS}/
|
||||||
rm -rf ${PWD}/web/node_modules/@goauthentik/api/
|
rm -rf ./web/node_modules/@goauthentik/api/
|
||||||
|
|
||||||
gen-clean-go: ## Remove generated API client for Go
|
gen-clean-go: ## Remove generated API client for Go
|
||||||
mkdir -p ${PWD}/${GEN_API_GO}
|
rm -rf ./${GEN_API_GO}/
|
||||||
ifneq ($(wildcard ${PWD}/${GEN_API_GO}/.*),)
|
|
||||||
make -C ${PWD}/${GEN_API_GO} clean
|
|
||||||
else
|
|
||||||
rm -rf ${PWD}/${GEN_API_GO}
|
|
||||||
endif
|
|
||||||
|
|
||||||
gen-clean-py: ## Remove generated API client for Python
|
gen-clean-py: ## Remove generated API client for Python
|
||||||
rm -rf ${PWD}/${GEN_API_PY}/
|
rm -rf ./${GEN_API_PY}/
|
||||||
|
|
||||||
gen-clean: gen-clean-ts gen-clean-go gen-clean-py ## Remove generated API clients
|
gen-clean: gen-clean-ts gen-clean-go gen-clean-py ## Remove generated API clients
|
||||||
|
|
||||||
gen-client-ts: gen-clean-ts ## Build and install the authentik API for Typescript into the authentik UI Application
|
gen-client-ts: gen-clean-ts ## Build and install the authentik API for Typescript into the authentik UI Application
|
||||||
./scripts/gen-client-ts.mjs
|
docker run \
|
||||||
|
--rm -v ${PWD}:/local \
|
||||||
npm i --prefix ${GEN_API_TS}
|
--user ${UID}:${GID} \
|
||||||
|
docker.io/openapitools/openapi-generator-cli:v7.11.0 generate \
|
||||||
cd ./${GEN_API_TS} && npm link
|
-i /local/schema.yml \
|
||||||
cd ./web && npm link @goauthentik/api
|
-g typescript-fetch \
|
||||||
|
-o /local/${GEN_API_TS} \
|
||||||
|
-c /local/scripts/api-ts-config.yaml \
|
||||||
|
--additional-properties=npmVersion=${NPM_VERSION} \
|
||||||
|
--git-repo-id authentik \
|
||||||
|
--git-user-id goauthentik
|
||||||
|
mkdir -p web/node_modules/@goauthentik/api
|
||||||
|
cd ./${GEN_API_TS} && npm i
|
||||||
|
\cp -rf ./${GEN_API_TS}/* web/node_modules/@goauthentik/api
|
||||||
|
|
||||||
gen-client-py: gen-clean-py ## Build and install the authentik API for Python
|
gen-client-py: gen-clean-py ## Build and install the authentik API for Python
|
||||||
./scripts/gen-client-py.mjs
|
docker run \
|
||||||
|
--rm -v ${PWD}:/local \
|
||||||
|
--user ${UID}:${GID} \
|
||||||
|
docker.io/openapitools/openapi-generator-cli:v7.11.0 generate \
|
||||||
|
-i /local/schema.yml \
|
||||||
|
-g python \
|
||||||
|
-o /local/${GEN_API_PY} \
|
||||||
|
-c /local/scripts/api-py-config.yaml \
|
||||||
|
--additional-properties=packageVersion=${NPM_VERSION} \
|
||||||
|
--git-repo-id authentik \
|
||||||
|
--git-user-id goauthentik
|
||||||
pip install ./${GEN_API_PY}
|
pip install ./${GEN_API_PY}
|
||||||
|
|
||||||
gen-client-go: gen-clean-go ## Build and install the authentik API for Golang
|
gen-client-go: gen-clean-go ## Build and install the authentik API for Golang
|
||||||
mkdir -p ${PWD}/${GEN_API_GO}
|
mkdir -p ./${GEN_API_GO} ./${GEN_API_GO}/templates
|
||||||
ifeq ($(wildcard ${PWD}/${GEN_API_GO}/.*),)
|
wget https://raw.githubusercontent.com/goauthentik/client-go/main/config.yaml -O ./${GEN_API_GO}/config.yaml
|
||||||
git clone --depth 1 https://github.com/goauthentik/client-go.git ${PWD}/${GEN_API_GO}
|
wget https://raw.githubusercontent.com/goauthentik/client-go/main/templates/README.mustache -O ./${GEN_API_GO}/templates/README.mustache
|
||||||
else
|
wget https://raw.githubusercontent.com/goauthentik/client-go/main/templates/go.mod.mustache -O ./${GEN_API_GO}/templates/go.mod.mustache
|
||||||
cd ${PWD}/${GEN_API_GO} && git pull
|
cp schema.yml ./${GEN_API_GO}/
|
||||||
endif
|
docker run \
|
||||||
cp ${PWD}/schema.yml ${PWD}/${GEN_API_GO}
|
--rm -v ${PWD}/${GEN_API_GO}:/local \
|
||||||
make -C ${PWD}/${GEN_API_GO} build
|
--user ${UID}:${GID} \
|
||||||
|
docker.io/openapitools/openapi-generator-cli:v6.5.0 generate \
|
||||||
|
-i /local/schema.yml \
|
||||||
|
-g go \
|
||||||
|
-o /local/ \
|
||||||
|
-c /local/config.yaml
|
||||||
go mod edit -replace goauthentik.io/api/v3=./${GEN_API_GO}
|
go mod edit -replace goauthentik.io/api/v3=./${GEN_API_GO}
|
||||||
|
rm -rf ./${GEN_API_GO}/config.yaml ./${GEN_API_GO}/templates/
|
||||||
|
|
||||||
gen-dev-config: ## Generate a local development config file
|
gen-dev-config: ## Generate a local development config file
|
||||||
uv run scripts/generate_config.py
|
uv run scripts/generate_config.py
|
||||||
@ -227,7 +244,7 @@ docker: ## Build a docker image of the current source tree
|
|||||||
DOCKER_BUILDKIT=1 docker build . --progress plain --tag ${DOCKER_IMAGE}
|
DOCKER_BUILDKIT=1 docker build . --progress plain --tag ${DOCKER_IMAGE}
|
||||||
|
|
||||||
test-docker:
|
test-docker:
|
||||||
BUILD=true ${PWD}/scripts/test_docker.sh
|
BUILD=true ./scripts/test_docker.sh
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
## CI
|
## CI
|
||||||
@ -247,3 +264,14 @@ ci-ruff: ci--meta-debug
|
|||||||
|
|
||||||
ci-codespell: ci--meta-debug
|
ci-codespell: ci--meta-debug
|
||||||
uv run codespell -s
|
uv run codespell -s
|
||||||
|
|
||||||
|
ci-bandit: ci--meta-debug
|
||||||
|
uv run bandit -r $(PY_SOURCES)
|
||||||
|
|
||||||
|
ci-pending-migrations: ci--meta-debug
|
||||||
|
uv run ak makemigrations --check
|
||||||
|
|
||||||
|
ci-test: ci--meta-debug
|
||||||
|
uv run coverage run manage.py test --keepdb --randomly-seed ${CI_TEST_SEED} authentik
|
||||||
|
uv run coverage report
|
||||||
|
uv run coverage xml
|
||||||
|
@ -42,4 +42,4 @@ See [SECURITY.md](SECURITY.md)
|
|||||||
|
|
||||||
## Adoption and Contributions
|
## Adoption and Contributions
|
||||||
|
|
||||||
Your organization uses authentik? We'd love to add your logo to the readme and our website! Email us @ hello@goauthentik.io or open a GitHub Issue/PR! For more information on how to contribute to authentik, please refer to our [CONTRIBUTING.md file](./CONTRIBUTING.md).
|
Your organization uses authentik? We'd love to add your logo to the readme and our website! Email us @ hello@goauthentik.io or open a GitHub Issue/PR! For more information on how to contribute to authentik, please refer to our [contribution guide](https://docs.goauthentik.io/docs/developer-docs?utm_source=github).
|
||||||
|
@ -54,7 +54,7 @@ def create_component(generator: SchemaGenerator, name, schema, type_=ResolvedCom
|
|||||||
return component
|
return component
|
||||||
|
|
||||||
|
|
||||||
def postprocess_schema_responses(result, generator: SchemaGenerator, **kwargs): # noqa: W0613
|
def postprocess_schema_responses(result, generator: SchemaGenerator, **kwargs):
|
||||||
"""Workaround to set a default response for endpoints.
|
"""Workaround to set a default response for endpoints.
|
||||||
Workaround suggested at
|
Workaround suggested at
|
||||||
<https://github.com/tfranzel/drf-spectacular/issues/119#issuecomment-656970357>
|
<https://github.com/tfranzel/drf-spectacular/issues/119#issuecomment-656970357>
|
||||||
|
@ -164,9 +164,7 @@ class BlueprintEntry:
|
|||||||
"""Get the blueprint model, with yaml tags resolved if present"""
|
"""Get the blueprint model, with yaml tags resolved if present"""
|
||||||
return str(self.tag_resolver(self.model, blueprint))
|
return str(self.tag_resolver(self.model, blueprint))
|
||||||
|
|
||||||
def get_permissions(
|
def get_permissions(self, blueprint: "Blueprint") -> Generator[BlueprintEntryPermission]:
|
||||||
self, blueprint: "Blueprint"
|
|
||||||
) -> Generator[BlueprintEntryPermission, None, None]:
|
|
||||||
"""Get permissions of this entry, with all yaml tags resolved"""
|
"""Get permissions of this entry, with all yaml tags resolved"""
|
||||||
for perm in self.permissions:
|
for perm in self.permissions:
|
||||||
yield BlueprintEntryPermission(
|
yield BlueprintEntryPermission(
|
||||||
|
@ -57,7 +57,7 @@ class LogEventSerializer(PassiveSerializer):
|
|||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def capture_logs(log_default_output=True) -> Generator[list[LogEvent], None, None]:
|
def capture_logs(log_default_output=True) -> Generator[list[LogEvent]]:
|
||||||
"""Capture log entries created"""
|
"""Capture log entries created"""
|
||||||
logs = []
|
logs = []
|
||||||
cap = LogCapture()
|
cap = LogCapture()
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'dist/sfe/bootstrap.min.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'dist/sfe/bootstrap.min.css' %}">
|
||||||
<meta name="sentry-trace" content="{{ sentry_trace }}" />
|
<meta name="sentry-trace" content="{{ sentry_trace }}" />
|
||||||
|
<link rel="prefetch" href="{{ flow_background_url }}" />
|
||||||
{% include "base/header_js.html" %}
|
{% include "base/header_js.html" %}
|
||||||
<style>
|
<style>
|
||||||
html,
|
html,
|
||||||
@ -22,7 +23,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
background-image: url("{{ flow.background_url }}");
|
background-image: url("{{ flow_background_url }}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{% block head_before %}
|
{% block head_before %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<link rel="prefetch" href="{{ flow.background_url }}" />
|
<link rel="prefetch" href="{{ flow_background_url }}" />
|
||||||
{% if flow.compatibility_mode and not inspector %}
|
{% if flow.compatibility_mode and not inspector %}
|
||||||
<script>ShadyDOM = { force: !navigator.webdriver };</script>
|
<script>ShadyDOM = { force: !navigator.webdriver };</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -21,7 +21,7 @@ window.authentik.flow = {
|
|||||||
<script src="{% versioned_script 'dist/flow/FlowInterface-%v.js' %}" type="module"></script>
|
<script src="{% versioned_script 'dist/flow/FlowInterface-%v.js' %}" type="module"></script>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--ak-flow-background: url("{{ flow.background_url }}");
|
--ak-flow-background: url("{{ flow_background_url }}");
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -13,7 +13,9 @@ class FlowInterfaceView(InterfaceView):
|
|||||||
"""Flow interface"""
|
"""Flow interface"""
|
||||||
|
|
||||||
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
|
def get_context_data(self, **kwargs: Any) -> dict[str, Any]:
|
||||||
kwargs["flow"] = get_object_or_404(Flow, slug=self.kwargs.get("flow_slug"))
|
flow = get_object_or_404(Flow, slug=self.kwargs.get("flow_slug"))
|
||||||
|
kwargs["flow"] = flow
|
||||||
|
kwargs["flow_background_url"] = flow.background_url(self.request)
|
||||||
kwargs["inspector"] = "inspector" in self.request.GET
|
kwargs["inspector"] = "inspector" in self.request.GET
|
||||||
return super().get_context_data(**kwargs)
|
return super().get_context_data(**kwargs)
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ class PropertyMappingManager:
|
|||||||
request: HttpRequest | None,
|
request: HttpRequest | None,
|
||||||
return_mapping: bool = False,
|
return_mapping: bool = False,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> Generator[tuple[dict, PropertyMapping], None]:
|
) -> Generator[tuple[dict, PropertyMapping]]:
|
||||||
"""Iterate over all mappings that were pre-compiled and
|
"""Iterate over all mappings that were pre-compiled and
|
||||||
execute all of them with the given context"""
|
execute all of them with the given context"""
|
||||||
if not self.__has_compiled:
|
if not self.__has_compiled:
|
||||||
|
@ -199,7 +199,7 @@ class SCIMGroupClient(SCIMClient[Group, SCIMProviderGroup, SCIMGroupSchema]):
|
|||||||
chunk_size = len(ops)
|
chunk_size = len(ops)
|
||||||
if len(ops) < 1:
|
if len(ops) < 1:
|
||||||
return
|
return
|
||||||
for chunk in batched(ops, chunk_size):
|
for chunk in batched(ops, chunk_size, strict=False):
|
||||||
req = PatchRequest(Operations=list(chunk))
|
req = PatchRequest(Operations=list(chunk))
|
||||||
self._request(
|
self._request(
|
||||||
"PATCH",
|
"PATCH",
|
||||||
|
8
go.mod
8
go.mod
@ -19,7 +19,7 @@ require (
|
|||||||
github.com/jellydator/ttlcache/v3 v3.3.0
|
github.com/jellydator/ttlcache/v3 v3.3.0
|
||||||
github.com/mitchellh/mapstructure v1.5.0
|
github.com/mitchellh/mapstructure v1.5.0
|
||||||
github.com/nmcclain/asn1-ber v0.0.0-20170104154839-2661553a0484
|
github.com/nmcclain/asn1-ber v0.0.0-20170104154839-2661553a0484
|
||||||
github.com/pires/go-proxyproto v0.8.0
|
github.com/pires/go-proxyproto v0.8.1
|
||||||
github.com/prometheus/client_golang v1.22.0
|
github.com/prometheus/client_golang v1.22.0
|
||||||
github.com/redis/go-redis/v9 v9.8.0
|
github.com/redis/go-redis/v9 v9.8.0
|
||||||
github.com/sethvargo/go-envconfig v1.3.0
|
github.com/sethvargo/go-envconfig v1.3.0
|
||||||
@ -29,8 +29,8 @@ require (
|
|||||||
github.com/wwt/guac v1.3.2
|
github.com/wwt/guac v1.3.2
|
||||||
goauthentik.io/api/v3 v3.2025040.1
|
goauthentik.io/api/v3 v3.2025040.1
|
||||||
golang.org/x/exp v0.0.0-20230210204819-062eb4c674ab
|
golang.org/x/exp v0.0.0-20230210204819-062eb4c674ab
|
||||||
golang.org/x/oauth2 v0.29.0
|
golang.org/x/oauth2 v0.30.0
|
||||||
golang.org/x/sync v0.13.0
|
golang.org/x/sync v0.14.0
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
gopkg.in/yaml.v2 v2.4.0
|
||||||
layeh.com/radius v0.0.0-20210819152912-ad72663a72ab
|
layeh.com/radius v0.0.0-20210819152912-ad72663a72ab
|
||||||
)
|
)
|
||||||
@ -75,7 +75,7 @@ require (
|
|||||||
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
||||||
golang.org/x/crypto v0.36.0 // indirect
|
golang.org/x/crypto v0.36.0 // indirect
|
||||||
golang.org/x/sys v0.31.0 // indirect
|
golang.org/x/sys v0.31.0 // indirect
|
||||||
golang.org/x/text v0.23.0 // indirect
|
golang.org/x/text v0.24.0 // indirect
|
||||||
google.golang.org/protobuf v1.36.5 // indirect
|
google.golang.org/protobuf v1.36.5 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
20
go.sum
20
go.sum
@ -230,8 +230,8 @@ github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+
|
|||||||
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||||
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
|
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
|
||||||
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
|
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
|
||||||
github.com/pires/go-proxyproto v0.8.0 h1:5unRmEAPbHXHuLjDg01CxJWf91cw3lKHc/0xzKpXEe0=
|
github.com/pires/go-proxyproto v0.8.1 h1:9KEixbdJfhrbtjpz/ZwCdWDD2Xem0NZ38qMYaASJgp0=
|
||||||
github.com/pires/go-proxyproto v0.8.0/go.mod h1:iknsfgnH8EkjrMeMyvfKByp9TiBZCKZM0jx2xmKqnVY=
|
github.com/pires/go-proxyproto v0.8.1/go.mod h1:ZKAAyp3cgy5Y5Mo4n9AlScrkCZwUy0g3Jf+slqQVcuU=
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
@ -358,16 +358,16 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/
|
|||||||
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||||
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
|
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
|
||||||
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||||
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||||
golang.org/x/oauth2 v0.29.0 h1:WdYw2tdTK1S8olAzWHdgeqfy+Mtm9XNhv/xJsY65d98=
|
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
|
||||||
golang.org/x/oauth2 v0.29.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
|
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
@ -376,8 +376,8 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ
|
|||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||||
golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610=
|
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
|
||||||
golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||||
@ -412,8 +412,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|||||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||||
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
|
||||||
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
|
||||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||||
|
@ -56,6 +56,7 @@ EXPOSE 3389 6636 9300
|
|||||||
|
|
||||||
USER 1000
|
USER 1000
|
||||||
|
|
||||||
ENV GOFIPS=1
|
ENV TMPDIR=/dev/shm/ \
|
||||||
|
GOFIPS=1
|
||||||
|
|
||||||
ENTRYPOINT ["/ldap"]
|
ENTRYPOINT ["/ldap"]
|
||||||
|
@ -97,6 +97,7 @@ elif [[ "$1" == "test-all" ]]; then
|
|||||||
elif [[ "$1" == "healthcheck" ]]; then
|
elif [[ "$1" == "healthcheck" ]]; then
|
||||||
run_authentik healthcheck $(cat $MODE_FILE)
|
run_authentik healthcheck $(cat $MODE_FILE)
|
||||||
elif [[ "$1" == "dump_config" ]]; then
|
elif [[ "$1" == "dump_config" ]]; then
|
||||||
|
shift
|
||||||
exec python -m authentik.lib.config $@
|
exec python -m authentik.lib.config $@
|
||||||
elif [[ "$1" == "debug" ]]; then
|
elif [[ "$1" == "debug" ]]; then
|
||||||
exec sleep infinity
|
exec sleep infinity
|
||||||
|
8
lifecycle/aws/package-lock.json
generated
8
lifecycle/aws/package-lock.json
generated
@ -9,7 +9,7 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"aws-cdk": "^2.1013.0",
|
"aws-cdk": "^2.1014.0",
|
||||||
"cross-env": "^7.0.3"
|
"cross-env": "^7.0.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -17,9 +17,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/aws-cdk": {
|
"node_modules/aws-cdk": {
|
||||||
"version": "2.1013.0",
|
"version": "2.1014.0",
|
||||||
"resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.1013.0.tgz",
|
"resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.1014.0.tgz",
|
||||||
"integrity": "sha512-cbq4cOoEIZueMWenGgfI4RujS+AQ9GaMCTlW/3CnvEIhMD8j/tgZx7PTtgMuvwYrRoEeb/wTxgLPgUd5FhsoHA==",
|
"integrity": "sha512-es101rtRAClix9BncNL54iW90MiOyRv4iCC5tv/firGDnidS6pPinuK0IIFt0RO6w0+3heRxWBXg8HY+f9877w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"node": ">=20"
|
"node": ">=20"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"aws-cdk": "^2.1013.0",
|
"aws-cdk": "^2.1014.0",
|
||||||
"cross-env": "^7.0.3"
|
"cross-env": "^7.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
BIN
locale/pt/LC_MESSAGES/django.mo
Normal file
BIN
locale/pt/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
3924
locale/pt/LC_MESSAGES/django.po
Normal file
3924
locale/pt/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
4
packages/docusaurus-config/package-lock.json
generated
4
packages/docusaurus-config/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@goauthentik/docusaurus-config",
|
"name": "@goauthentik/docusaurus-config",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@goauthentik/docusaurus-config",
|
"name": "@goauthentik/docusaurus-config",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"deepmerge-ts": "^7.1.5",
|
"deepmerge-ts": "^7.1.5",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@goauthentik/docusaurus-config",
|
"name": "@goauthentik/docusaurus-config",
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"description": "authentik's Docusaurus config",
|
"description": "authentik's Docusaurus config",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -76,6 +76,7 @@ EXPOSE 9000 9300 9443
|
|||||||
|
|
||||||
USER 1000
|
USER 1000
|
||||||
|
|
||||||
ENV GOFIPS=1
|
ENV TMPDIR=/dev/shm/ \
|
||||||
|
GOFIPS=1
|
||||||
|
|
||||||
ENTRYPOINT ["/proxy"]
|
ENTRYPOINT ["/proxy"]
|
||||||
|
@ -3,7 +3,7 @@ name = "authentik"
|
|||||||
version = "2025.4.0"
|
version = "2025.4.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = [{ name = "authentik Team", email = "hello@goauthentik.io" }]
|
authors = [{ name = "authentik Team", email = "hello@goauthentik.io" }]
|
||||||
requires-python = "==3.12.*"
|
requires-python = "==3.13.*"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"argon2-cffi",
|
"argon2-cffi",
|
||||||
"celery",
|
"celery",
|
||||||
@ -52,7 +52,7 @@ dependencies = [
|
|||||||
"pydantic-scim",
|
"pydantic-scim",
|
||||||
"pyjwt",
|
"pyjwt",
|
||||||
"pyrad",
|
"pyrad",
|
||||||
"python-kadmin-rs ==0.6.0",
|
"python-kadmin-rs",
|
||||||
"pyyaml",
|
"pyyaml",
|
||||||
"requests-oauthlib",
|
"requests-oauthlib",
|
||||||
"scim2-filter-parser",
|
"scim2-filter-parser",
|
||||||
@ -70,7 +70,7 @@ dependencies = [
|
|||||||
"watchdog",
|
"watchdog",
|
||||||
"webauthn",
|
"webauthn",
|
||||||
"wsproto",
|
"wsproto",
|
||||||
"xmlsec <= 1.3.14",
|
"xmlsec",
|
||||||
"zxcvbn",
|
"zxcvbn",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -101,6 +101,18 @@ dev = [
|
|||||||
"selenium",
|
"selenium",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.uv]
|
||||||
|
no-binary-package = [
|
||||||
|
# This differs from the no-binary packages in the Dockerfile. This is due to the fact
|
||||||
|
# that these packages are built from source for different reasons than cryptography and kadmin.
|
||||||
|
# These packages are built from source to link against the libxml2 on the system which is
|
||||||
|
# required for functionality and to stay up-to-date on both libraries.
|
||||||
|
# The other packages specified in the dockerfile are compiled from source to link against the
|
||||||
|
# correct FIPS OpenSSL libraries
|
||||||
|
"lxml",
|
||||||
|
"xmlsec",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
django-tenants = { git = "https://github.com/rissson/django-tenants.git", branch = "authentik-fixes" }
|
django-tenants = { git = "https://github.com/rissson/django-tenants.git", branch = "authentik-fixes" }
|
||||||
opencontainers = { git = "https://github.com/BeryJu/oci-python", rev = "c791b19056769cd67957322806809ab70f5bead8" }
|
opencontainers = { git = "https://github.com/BeryJu/oci-python", rev = "c791b19056769cd67957322806809ab70f5bead8" }
|
||||||
@ -143,12 +155,12 @@ ignore-words = ".github/codespell-words.txt"
|
|||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
target-version = ['py312']
|
target-version = ['py313']
|
||||||
exclude = 'node_modules'
|
exclude = 'node_modules'
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
target-version = "py312"
|
target-version = "py313"
|
||||||
exclude = ["**/migrations/**", "**/node_modules/**"]
|
exclude = ["**/migrations/**", "**/node_modules/**"]
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
|
@ -56,6 +56,7 @@ HEALTHCHECK --interval=5s --retries=20 --start-period=3s CMD [ "/rac", "healthch
|
|||||||
|
|
||||||
USER 1000
|
USER 1000
|
||||||
|
|
||||||
ENV GOFIPS=1
|
ENV TMPDIR=/dev/shm/ \
|
||||||
|
GOFIPS=1
|
||||||
|
|
||||||
ENTRYPOINT ["/rac"]
|
ENTRYPOINT ["/rac"]
|
||||||
|
@ -56,6 +56,7 @@ EXPOSE 1812/udp 9300
|
|||||||
|
|
||||||
USER 1000
|
USER 1000
|
||||||
|
|
||||||
ENV GOFIPS=1
|
ENV TMPDIR=/dev/shm/ \
|
||||||
|
GOFIPS=1
|
||||||
|
|
||||||
ENTRYPOINT ["/radius"]
|
ENTRYPOINT ["/radius"]
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
/**
|
|
||||||
* @file Generates the authentik API client for Python.
|
|
||||||
*/
|
|
||||||
import { dirname, resolve } from "node:path";
|
|
||||||
import { fileURLToPath } from "node:url";
|
|
||||||
|
|
||||||
import { generateOpenAPIClient } from "./openapi-generator.mjs";
|
|
||||||
|
|
||||||
const scriptDirectory = dirname(fileURLToPath(import.meta.url));
|
|
||||||
|
|
||||||
const repoRoot = resolve(scriptDirectory, "..");
|
|
||||||
|
|
||||||
generateOpenAPIClient({
|
|
||||||
cwd: repoRoot,
|
|
||||||
outputDirectory: resolve(repoRoot, "gen-py-api"),
|
|
||||||
generatorName: "python",
|
|
||||||
config: resolve(scriptDirectory, "api-py-config.yaml"),
|
|
||||||
});
|
|
@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
/**
|
|
||||||
* @file Generates the authentik API client for TypeScript.
|
|
||||||
*/
|
|
||||||
import { dirname, resolve } from "node:path";
|
|
||||||
import { fileURLToPath } from "node:url";
|
|
||||||
|
|
||||||
import PackageJSON from "../package.json" with { type: "json" };
|
|
||||||
import { generateOpenAPIClient } from "./openapi-generator.mjs";
|
|
||||||
|
|
||||||
const scriptDirectory = dirname(fileURLToPath(import.meta.url));
|
|
||||||
|
|
||||||
const repoRoot = resolve(scriptDirectory, "..");
|
|
||||||
const npmVersion = [PackageJSON.version, Date.now()].join("-");
|
|
||||||
|
|
||||||
generateOpenAPIClient({
|
|
||||||
cwd: repoRoot,
|
|
||||||
outputDirectory: resolve(repoRoot, "gen-ts-api"),
|
|
||||||
generatorName: "typescript-fetch",
|
|
||||||
config: resolve(scriptDirectory, "api-ts-config.yaml"),
|
|
||||||
commandArgs: [`--additional-properties=npmVersion=${npmVersion}`],
|
|
||||||
});
|
|
15
scripts/generate_semver.py
Executable file
15
scripts/generate_semver.py
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Generates a Semantic Versioning identifier, suffixed with a timestamp.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from time import time
|
||||||
|
|
||||||
|
from authentik import __version__ as package_version
|
||||||
|
|
||||||
|
"""
|
||||||
|
See: https://semver.org/#spec-item-9 (Pre-release spec)
|
||||||
|
"""
|
||||||
|
pre_release_timestamp = int(time())
|
||||||
|
|
||||||
|
print(f"{package_version}-{pre_release_timestamp}")
|
@ -1,100 +0,0 @@
|
|||||||
/**
|
|
||||||
* @file OpenAPI generator utilities.
|
|
||||||
*/
|
|
||||||
import { execFileSync, execSync } from "node:child_process";
|
|
||||||
import { existsSync, rmSync } from "node:fs";
|
|
||||||
import { userInfo } from "node:os";
|
|
||||||
import { join, relative, resolve } from "node:path";
|
|
||||||
|
|
||||||
const OPENAPI_CONTAINER_IMAGE = "docker.io/openapitools/openapi-generator-cli:v7.11.0";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if a command exists in the PATH.
|
|
||||||
*
|
|
||||||
* @template {string} T
|
|
||||||
* @param {T} command
|
|
||||||
* @returns {T | null}
|
|
||||||
*/
|
|
||||||
function commandExists(command) {
|
|
||||||
if (execSync(`command -v ${command} || echo ''`).toString().trim()) {
|
|
||||||
return command;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Given a path relative to the current working directory,
|
|
||||||
* resolves it to a path relative to the local volume.
|
|
||||||
*
|
|
||||||
* @param {string} cwd
|
|
||||||
* @param {...string} pathSegments
|
|
||||||
*/
|
|
||||||
function resolveLocalPath(cwd, ...pathSegments) {
|
|
||||||
return resolve("/local", relative(cwd, join(...pathSegments)));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {object} GenerateOpenAPIClientOptions
|
|
||||||
* @property {string} cwd The working directory to run the generator in.
|
|
||||||
* @property {string} outputDirectory The path to the output directory.
|
|
||||||
* @property {string} generatorName The name of the generator.
|
|
||||||
* @property {string} config The path to the generator configuration.
|
|
||||||
* @property {string} [inputSpec] The path to the OpenAPI specification.
|
|
||||||
* @property {Array<string | string[]>} [commandArgs] Additional arguments to pass to the generator.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generates an OpenAPI client using the `openapi-generator-cli` Docker image.
|
|
||||||
*
|
|
||||||
* @param {GenerateOpenAPIClientOptions} options
|
|
||||||
* @see {@link https://openapi-generator.tech/docs/usage}
|
|
||||||
*/
|
|
||||||
export function generateOpenAPIClient({
|
|
||||||
cwd,
|
|
||||||
outputDirectory,
|
|
||||||
generatorName,
|
|
||||||
config,
|
|
||||||
inputSpec = resolve(cwd, "schema.yml"),
|
|
||||||
commandArgs = [],
|
|
||||||
}) {
|
|
||||||
if (existsSync(outputDirectory)) {
|
|
||||||
console.log(`Removing existing generated API client from ${outputDirectory}`);
|
|
||||||
|
|
||||||
rmSync(outputDirectory, { recursive: true, force: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
const containerEngine = commandExists("docker") || commandExists("podman");
|
|
||||||
|
|
||||||
if (!containerEngine) {
|
|
||||||
throw new Error("Container engine not found. Is Docker or Podman available in the PATH?");
|
|
||||||
}
|
|
||||||
|
|
||||||
const { gid, uid } = userInfo();
|
|
||||||
|
|
||||||
const args = [
|
|
||||||
"run",
|
|
||||||
[`--user`, `${uid}:${gid}`],
|
|
||||||
`--rm`,
|
|
||||||
[`-v`, `${cwd}:/local`],
|
|
||||||
OPENAPI_CONTAINER_IMAGE,
|
|
||||||
"generate",
|
|
||||||
["--input-spec", resolveLocalPath(cwd, inputSpec)],
|
|
||||||
[`--generator-name`, generatorName],
|
|
||||||
["--config", resolveLocalPath(cwd, config)],
|
|
||||||
["--git-repo-id", `authentik`],
|
|
||||||
["--git-user-id", `goauthentik`],
|
|
||||||
["--output", resolveLocalPath(cwd, outputDirectory)],
|
|
||||||
|
|
||||||
...commandArgs,
|
|
||||||
];
|
|
||||||
|
|
||||||
console.debug(`Running command: ${containerEngine}`, args);
|
|
||||||
|
|
||||||
execFileSync(containerEngine, args.flat(), {
|
|
||||||
cwd,
|
|
||||||
stdio: "inherit",
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(`Generated API client to ${outputDirectory}`);
|
|
||||||
}
|
|
@ -1,12 +1,12 @@
|
|||||||
services:
|
services:
|
||||||
chrome:
|
chrome:
|
||||||
image: docker.io/selenium/standalone-chrome:122.0
|
image: docker.io/selenium/standalone-chrome:136.0
|
||||||
volumes:
|
volumes:
|
||||||
- /dev/shm:/dev/shm
|
- /dev/shm:/dev/shm
|
||||||
network_mode: host
|
network_mode: host
|
||||||
restart: always
|
restart: always
|
||||||
mailpit:
|
mailpit:
|
||||||
image: docker.io/axllent/mailpit:v1.6.5
|
image: docker.io/axllent/mailpit:v1.24.2
|
||||||
ports:
|
ports:
|
||||||
- 1025:1025
|
- 1025:1025
|
||||||
- 8025:8025
|
- 8025:8025
|
||||||
|
@ -26,6 +26,7 @@ from selenium import webdriver
|
|||||||
from selenium.common.exceptions import NoSuchElementException, TimeoutException, WebDriverException
|
from selenium.common.exceptions import NoSuchElementException, TimeoutException, WebDriverException
|
||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
from selenium.webdriver.common.keys import Keys
|
from selenium.webdriver.common.keys import Keys
|
||||||
|
from selenium.webdriver.remote.command import Command
|
||||||
from selenium.webdriver.remote.webdriver import WebDriver
|
from selenium.webdriver.remote.webdriver import WebDriver
|
||||||
from selenium.webdriver.remote.webelement import WebElement
|
from selenium.webdriver.remote.webelement import WebElement
|
||||||
from selenium.webdriver.support.wait import WebDriverWait
|
from selenium.webdriver.support.wait import WebDriverWait
|
||||||
@ -197,7 +198,12 @@ class SeleniumTestCase(DockerTestCase, StaticLiveServerTestCase):
|
|||||||
super().tearDown()
|
super().tearDown()
|
||||||
if IS_CI:
|
if IS_CI:
|
||||||
print("::group::Browser logs")
|
print("::group::Browser logs")
|
||||||
for line in self.driver.get_log("browser"):
|
# Very verbose way to get browser logs
|
||||||
|
# https://github.com/SeleniumHQ/selenium/pull/15641
|
||||||
|
# for some reason this removes the `get_log` API from Remote Webdriver
|
||||||
|
# and only keeps it on the local Chrome web driver, even when using
|
||||||
|
# a remote chrome driver...? (nvm the fact this was released as a minor version)
|
||||||
|
for line in self.driver.execute(Command.GET_LOG, {"type": "browser"})["value"]:
|
||||||
print(line["message"])
|
print(line["message"])
|
||||||
if IS_CI:
|
if IS_CI:
|
||||||
print("::endgroup::")
|
print("::endgroup::")
|
||||||
|
9
web/package-lock.json
generated
9
web/package-lock.json
generated
@ -9472,9 +9472,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001667",
|
"version": "1.0.30001716",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz",
|
||||||
"integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==",
|
"integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@ -9489,7 +9489,8 @@
|
|||||||
"type": "github",
|
"type": "github",
|
||||||
"url": "https://github.com/sponsors/ai"
|
"url": "https://github.com/sponsors/ai"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"license": "CC-BY-4.0"
|
||||||
},
|
},
|
||||||
"node_modules/ccount": {
|
"node_modules/ccount": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
|
@ -47,7 +47,16 @@ class SimpleFlowExecutor {
|
|||||||
return `${ak().api.base}api/v3/flows/executor/${this.flowSlug}/?query=${encodeURIComponent(window.location.search.substring(1))}`;
|
return `${ak().api.base}api/v3/flows/executor/${this.flowSlug}/?query=${encodeURIComponent(window.location.search.substring(1))}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
loading() {
|
||||||
|
this.container.innerHTML = `<div class="d-flex justify-content-center">
|
||||||
|
<div class="spinner-border spinner-border-md" role="status">
|
||||||
|
<span class="sr-only">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
this.loading();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: this.apiURL,
|
url: this.apiURL,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-number-input";
|
import "@goauthentik/components/ak-number-input";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "@goauthentik/components/ak-switch-input";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "@goauthentik/components/ak-text-input";
|
||||||
@ -184,20 +183,14 @@ export class AdminSettingsForm extends Form<SettingsRequest> {
|
|||||||
label=${msg("Reputation: lower limit")}
|
label=${msg("Reputation: lower limit")}
|
||||||
required
|
required
|
||||||
name="reputationLowerLimit"
|
name="reputationLowerLimit"
|
||||||
value="${first(
|
value="${this._settings?.reputationLowerLimit ?? DEFAULT_REPUTATION_LOWER_LIMIT}"
|
||||||
this._settings?.reputationLowerLimit,
|
|
||||||
DEFAULT_REPUTATION_LOWER_LIMIT,
|
|
||||||
)}"
|
|
||||||
help=${msg("Reputation cannot decrease lower than this value. Zero or negative.")}
|
help=${msg("Reputation cannot decrease lower than this value. Zero or negative.")}
|
||||||
></ak-number-input>
|
></ak-number-input>
|
||||||
<ak-number-input
|
<ak-number-input
|
||||||
label=${msg("Reputation: upper limit")}
|
label=${msg("Reputation: upper limit")}
|
||||||
required
|
required
|
||||||
name="reputationUpperLimit"
|
name="reputationUpperLimit"
|
||||||
value="${first(
|
value="${this._settings?.reputationUpperLimit ?? DEFAULT_REPUTATION_UPPER_LIMIT}"
|
||||||
this._settings?.reputationUpperLimit,
|
|
||||||
DEFAULT_REPUTATION_UPPER_LIMIT,
|
|
||||||
)}"
|
|
||||||
help=${msg("Reputation cannot increase higher than this value. Zero or positive.")}
|
help=${msg("Reputation cannot increase higher than this value. Zero or positive.")}
|
||||||
></ak-number-input>
|
></ak-number-input>
|
||||||
<ak-form-element-horizontal label=${msg("Footer links")} name="footerLinks">
|
<ak-form-element-horizontal label=${msg("Footer links")} name="footerLinks">
|
||||||
@ -257,7 +250,7 @@ export class AdminSettingsForm extends Form<SettingsRequest> {
|
|||||||
label=${msg("Default token length")}
|
label=${msg("Default token length")}
|
||||||
required
|
required
|
||||||
name="defaultTokenLength"
|
name="defaultTokenLength"
|
||||||
value="${first(this._settings?.defaultTokenLength, 60)}"
|
value="${this._settings?.defaultTokenLength ?? 60}"
|
||||||
help=${msg("Default length of generated tokens")}
|
help=${msg("Default length of generated tokens")}
|
||||||
></ak-number-input>
|
></ak-number-input>
|
||||||
`;
|
`;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import "@goauthentik/admin/applications/ProviderSelectModal";
|
import "@goauthentik/admin/applications/ProviderSelectModal";
|
||||||
import { iconHelperText } from "@goauthentik/admin/helperText";
|
import { iconHelperText } from "@goauthentik/admin/helperText";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-file-input";
|
import "@goauthentik/components/ak-file-input";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "@goauthentik/components/ak-radio-input";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "@goauthentik/components/ak-switch-input";
|
||||||
@ -194,7 +193,7 @@ export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Applicatio
|
|||||||
></ak-text-input>
|
></ak-text-input>
|
||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="openInNewTab"
|
name="openInNewTab"
|
||||||
?checked=${first(this.instance?.openInNewTab, false)}
|
?checked=${this.instance?.openInNewTab ?? false}
|
||||||
label=${msg("Open in new tab")}
|
label=${msg("Open in new tab")}
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"If checked, the launch URL will open in a new browser tab or window from the user's application library.",
|
"If checked, the launch URL will open in a new browser tab or window from the user's application library.",
|
||||||
@ -221,7 +220,7 @@ export class ApplicationForm extends WithCapabilitiesConfig(ModelForm<Applicatio
|
|||||||
: html` <ak-text-input
|
: html` <ak-text-input
|
||||||
label=${msg("Icon")}
|
label=${msg("Icon")}
|
||||||
name="metaIcon"
|
name="metaIcon"
|
||||||
value=${first(this.instance?.metaIcon, "")}
|
value=${this.instance?.metaIcon ?? ""}
|
||||||
help=${iconHelperText}
|
help=${iconHelperText}
|
||||||
>
|
>
|
||||||
</ak-text-input>`}
|
</ak-text-input>`}
|
||||||
|
@ -113,8 +113,7 @@ export class ApplicationViewPage extends AKElement {
|
|||||||
|
|
||||||
renderApp(): TemplateResult {
|
renderApp(): TemplateResult {
|
||||||
if (!this.application) {
|
if (!this.application) {
|
||||||
return html`<ak-empty-state ?loading="${true}" header=${msg("Loading")}>
|
return html`<ak-empty-state loading header=${msg("Loading")}> </ak-empty-state>`;
|
||||||
</ak-empty-state>`;
|
|
||||||
}
|
}
|
||||||
return html`<ak-tabs>
|
return html`<ak-tabs>
|
||||||
${this.missingOutpost
|
${this.missingOutpost
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -60,7 +59,7 @@ export class ApplicationEntitlementForm extends ModelForm<ApplicationEntitlement
|
|||||||
return html` <ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
return html` <ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -72,7 +71,7 @@ export class ApplicationEntitlementForm extends ModelForm<ApplicationEntitlement
|
|||||||
>
|
>
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value="${YAML.stringify(first(this.instance?.attributes, {}))}"
|
value="${YAML.stringify(this.instance?.attributes ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { policyOptions } from "@goauthentik/admin/applications/PolicyOptions.js";
|
import { policyOptions } from "@goauthentik/admin/applications/PolicyOptions.js";
|
||||||
import { ApplicationWizardStep } from "@goauthentik/admin/applications/wizard/ApplicationWizardStep.js";
|
import { ApplicationWizardStep } from "@goauthentik/admin/applications/wizard/ApplicationWizardStep.js";
|
||||||
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
import "@goauthentik/admin/applications/wizard/ak-wizard-title.js";
|
||||||
import { isSlug } from "@goauthentik/common/utils.js";
|
|
||||||
import { camelToSnake } from "@goauthentik/common/utils.js";
|
import { camelToSnake } from "@goauthentik/common/utils.js";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "@goauthentik/components/ak-radio-input";
|
||||||
import "@goauthentik/components/ak-slug-input";
|
import "@goauthentik/components/ak-slug-input";
|
||||||
@ -11,6 +10,7 @@ import { type NavigableButton, type WizardButton } from "@goauthentik/components
|
|||||||
import { type KeyUnknown } from "@goauthentik/elements/forms/Form";
|
import { type KeyUnknown } from "@goauthentik/elements/forms/Form";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
import { isSlug } from "@goauthentik/elements/router/utils.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { docLink } from "@goauthentik/common/global";
|
import { docLink } from "@goauthentik/common/global";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-toggle-group";
|
import "@goauthentik/components/ak-toggle-group";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
@ -80,7 +79,7 @@ export class BlueprintForm extends ModelForm<BlueprintInstance, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -184,7 +183,7 @@ export class BlueprintForm extends ModelForm<BlueprintInstance, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Context")} name="context">
|
<ak-form-element-horizontal label=${msg("Context")} name="context">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value="${YAML.stringify(first(this.instance?.context, {}))}"
|
value="${YAML.stringify(this.instance?.context ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -2,7 +2,6 @@ import "@goauthentik/admin/common/ak-crypto-certificate-search";
|
|||||||
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { DefaultBrand } from "@goauthentik/common/ui/config";
|
import { DefaultBrand } from "@goauthentik/common/ui/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
@ -54,7 +53,7 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
return html` <ak-form-element-horizontal label=${msg("Domain")} required name="domain">
|
return html` <ak-form-element-horizontal label=${msg("Domain")} required name="domain">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.domain, window.location.host)}"
|
value="${this.instance?.domain ?? window.location.host}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -72,7 +71,7 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?._default, false)}
|
?checked=${this.instance?._default ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -92,10 +91,7 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Title")} required name="brandingTitle">
|
<ak-form-element-horizontal label=${msg("Title")} required name="brandingTitle">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.brandingTitle ?? DefaultBrand.brandingTitle}"
|
||||||
this.instance?.brandingTitle,
|
|
||||||
DefaultBrand.brandingTitle,
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -106,7 +102,7 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Logo")} required name="brandingLogo">
|
<ak-form-element-horizontal label=${msg("Logo")} required name="brandingLogo">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.brandingLogo, DefaultBrand.brandingLogo)}"
|
value="${this.instance?.brandingLogo ?? DefaultBrand.brandingLogo}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -123,10 +119,8 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.brandingFavicon ??
|
||||||
this.instance?.brandingFavicon,
|
DefaultBrand.brandingFavicon}"
|
||||||
DefaultBrand.brandingFavicon,
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -143,10 +137,8 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.brandingDefaultFlowBackground ??
|
||||||
this.instance?.brandingDefaultFlowBackground,
|
"/static/dist/assets/images/flow_background.jpg"}"
|
||||||
"/static/dist/assets/images/flow_background.jpg",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -165,10 +157,8 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
>
|
>
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.CSS}
|
mode=${CodeMirrorMode.CSS}
|
||||||
value="${first(
|
value="${this.instance?.brandingCustomCss ??
|
||||||
this.instance?.brandingCustomCss,
|
DefaultBrand.brandingCustomCss}"
|
||||||
DefaultBrand.brandingCustomCss,
|
|
||||||
)}"
|
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -317,7 +307,7 @@ export class BrandForm extends ModelForm<Brand, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Attributes")} name="attributes">
|
<ak-form-element-horizontal label=${msg("Attributes")} name="attributes">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value="${YAML.stringify(first(this.instance?.attributes, {}))}"
|
value="${YAML.stringify(this.instance?.attributes ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
||||||
import "@goauthentik/elements/forms/Radio";
|
import "@goauthentik/elements/forms/Radio";
|
||||||
@ -185,7 +184,7 @@ export class TransportForm extends ModelForm<NotificationTransport, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.sendOnce, false)}
|
?checked=${this.instance?.sendOnce ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { DesignationToLabel, LayoutToLabel } from "@goauthentik/admin/flows/utils";
|
import { DesignationToLabel, LayoutToLabel } from "@goauthentik/admin/flows/utils";
|
||||||
import { AuthenticationEnum } from "@goauthentik/api/dist/models/AuthenticationEnum";
|
import { AuthenticationEnum } from "@goauthentik/api/dist/models/AuthenticationEnum";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import {
|
import {
|
||||||
CapabilitiesEnum,
|
CapabilitiesEnum,
|
||||||
WithCapabilitiesConfig,
|
WithCapabilitiesConfig,
|
||||||
@ -227,7 +226,7 @@ export class FlowForm extends WithCapabilitiesConfig(ModelForm<Flow, string>) {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.compatibilityMode, false)}
|
?checked=${this.instance?.compatibilityMode ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -407,7 +406,7 @@ export class FlowForm extends WithCapabilitiesConfig(ModelForm<Flow, string>) {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.background, "")}"
|
value="${this.instance?.background ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first, groupBy } from "@goauthentik/common/utils";
|
import { groupBy } from "@goauthentik/common/utils";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
||||||
import "@goauthentik/elements/forms/Radio";
|
import "@goauthentik/elements/forms/Radio";
|
||||||
@ -123,7 +123,7 @@ export class StageBindingForm extends ModelForm<FlowStageBinding, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Order")} ?required=${true} name="order">
|
<ak-form-element-horizontal label=${msg("Order")} ?required=${true} name="order">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.order, this.defaultOrder)}"
|
value="${this.instance?.order ?? this.defaultOrder}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -133,7 +133,7 @@ export class StageBindingForm extends ModelForm<FlowStageBinding, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.evaluateOnPlan, false)}
|
?checked=${this.instance?.evaluateOnPlan ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -151,7 +151,7 @@ export class StageBindingForm extends ModelForm<FlowStageBinding, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.reEvaluatePolicies, true)}
|
?checked=${this.instance?.reEvaluatePolicies ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import "@goauthentik/admin/groups/MemberSelectModal";
|
import "@goauthentik/admin/groups/MemberSelectModal";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider";
|
||||||
@ -77,7 +76,7 @@ export class GroupForm extends ModelForm<Group, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.isSuperuser, false)}
|
?checked=${this.instance?.isSuperuser ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -150,7 +149,7 @@ export class GroupForm extends ModelForm<Group, string> {
|
|||||||
>
|
>
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value="${YAML.stringify(first(this.instance?.attributes, {}))}"
|
value="${YAML.stringify(this.instance?.attributes ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import "@goauthentik/admin/common/ak-crypto-certificate-search";
|
import "@goauthentik/admin/common/ak-crypto-certificate-search";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "@goauthentik/elements/forms/SearchSelect";
|
||||||
@ -53,7 +52,7 @@ export class ServiceConnectionDockerForm extends ModelForm<DockerServiceConnecti
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.local, false)}
|
?checked=${this.instance?.local ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -57,7 +56,7 @@ export class ServiceConnectionKubernetesForm extends ModelForm<
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.local, false)}
|
?checked=${this.instance?.local ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -75,7 +74,7 @@ export class ServiceConnectionKubernetesForm extends ModelForm<
|
|||||||
<ak-form-element-horizontal label=${msg("Kubeconfig")} name="kubeconfig">
|
<ak-form-element-horizontal label=${msg("Kubeconfig")} name="kubeconfig">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value="${YAML.stringify(first(this.instance?.kubeconfig, {}))}"
|
value="${YAML.stringify(this.instance?.kubeconfig ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -87,7 +86,7 @@ export class ServiceConnectionKubernetesForm extends ModelForm<
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.verifySsl, true)}
|
?checked=${this.instance?.verifySsl ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -3,7 +3,7 @@ import {
|
|||||||
PolicyBindingCheckTargetToLabel,
|
PolicyBindingCheckTargetToLabel,
|
||||||
} from "@goauthentik/admin/policies/utils";
|
} from "@goauthentik/admin/policies/utils";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first, groupBy } from "@goauthentik/common/utils";
|
import { groupBy } from "@goauthentik/common/utils";
|
||||||
import "@goauthentik/components/ak-toggle-group";
|
import "@goauthentik/components/ak-toggle-group";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
||||||
@ -274,7 +274,7 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -289,7 +289,7 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.negate, false)}
|
?checked=${this.instance?.negate ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -305,7 +305,7 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Order")} ?required=${true} name="order">
|
<ak-form-element-horizontal label=${msg("Order")} ?required=${true} name="order">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.order, this.defaultOrder)}"
|
value="${this.instance?.order ?? this.defaultOrder}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -313,7 +313,7 @@ export class PolicyBindingForm extends ModelForm<PolicyBinding, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Timeout")} ?required=${true} name="timeout">
|
<ak-form-element-horizontal label=${msg("Timeout")} ?required=${true} name="timeout">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.timeout, 30)}"
|
value="${this.instance?.timeout ?? 30}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "@goauthentik/components/ak-status-label";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
@ -125,7 +124,7 @@ export class PolicyTestForm extends Form<PolicyTestRequest> {
|
|||||||
<ak-form-element-horizontal label=${msg("Context")} name="context">
|
<ak-form-element-horizontal label=${msg("Context")} name="context">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value=${YAML.stringify(first(this.request?.context, {}))}
|
value=${YAML.stringify(this.request?.context ?? {})}
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
@ -51,7 +50,7 @@ export class DummyPolicyForm extends BasePolicyForm<DummyPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.executionLogging, false)}
|
?checked=${this.instance?.executionLogging ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -74,7 +73,7 @@ export class DummyPolicyForm extends BasePolicyForm<DummyPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.result, false)}
|
?checked=${this.instance?.result ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -91,7 +90,7 @@ export class DummyPolicyForm extends BasePolicyForm<DummyPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.waitMin, 1)}"
|
value="${this.instance?.waitMin ?? 1}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -108,7 +107,7 @@ export class DummyPolicyForm extends BasePolicyForm<DummyPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.waitMax, 5)}"
|
value="${this.instance?.waitMax ?? 5}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "@goauthentik/elements/forms/SearchSelect";
|
||||||
@ -63,7 +62,7 @@ export class EventMatcherPolicyForm extends BasePolicyForm<EventMatcherPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.executionLogging, false)}
|
?checked=${this.instance?.executionLogging ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
@ -51,7 +50,7 @@ export class PasswordExpiryPolicyForm extends BasePolicyForm<PasswordExpiryPolic
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.executionLogging, false)}
|
?checked=${this.instance?.executionLogging ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -86,7 +85,7 @@ export class PasswordExpiryPolicyForm extends BasePolicyForm<PasswordExpiryPolic
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.denyOnly, false)}
|
?checked=${this.instance?.denyOnly ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { docLink } from "@goauthentik/common/global";
|
import { docLink } from "@goauthentik/common/global";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
@ -54,7 +53,7 @@ export class ExpressionPolicyForm extends BasePolicyForm<ExpressionPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.executionLogging, false)}
|
?checked=${this.instance?.executionLogging ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/ak-dual-select";
|
import "@goauthentik/elements/ak-dual-select";
|
||||||
import { DataProvision, DualSelectPair } from "@goauthentik/elements/ak-dual-select/types";
|
import { DataProvision, DualSelectPair } from "@goauthentik/elements/ak-dual-select/types";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
@ -112,7 +111,7 @@ export class GeoIPPolicyForm extends BasePolicyForm<GeoIPPolicy> {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
value="${first(this.instance?.historyMaxDistanceKm, 100)}"
|
value="${this.instance?.historyMaxDistanceKm ?? 100}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -128,7 +127,7 @@ export class GeoIPPolicyForm extends BasePolicyForm<GeoIPPolicy> {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
value="${first(this.instance?.distanceToleranceKm, 50)}"
|
value="${this.instance?.distanceToleranceKm ?? 50}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -142,7 +141,7 @@ export class GeoIPPolicyForm extends BasePolicyForm<GeoIPPolicy> {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
value="${first(this.instance?.historyLoginCount, 5)}"
|
value="${this.instance?.historyLoginCount ?? 5}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -178,7 +177,7 @@ export class GeoIPPolicyForm extends BasePolicyForm<GeoIPPolicy> {
|
|||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
value="${first(this.instance?.impossibleToleranceKm, 50)}"
|
value="${this.instance?.impossibleToleranceKm ?? 50}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
@ -56,7 +55,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.lengthMin, 10)}"
|
value="${this.instance?.lengthMin ?? 10}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -68,7 +67,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.amountUppercase, 2)}"
|
value="${this.instance?.amountUppercase ?? 2}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -80,7 +79,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.amountLowercase, 2)}"
|
value="${this.instance?.amountLowercase ?? 2}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -92,7 +91,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.amountDigits, 2)}"
|
value="${this.instance?.amountDigits ?? 2}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -104,7 +103,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.amountSymbols, 2)}"
|
value="${this.instance?.amountSymbols ?? 2}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -154,7 +153,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.hibpAllowedCount, 0)}"
|
value="${this.instance?.hibpAllowedCount ?? 0}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -179,7 +178,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.zxcvbnScoreThreshold, 0)}"
|
value="${this.instance?.zxcvbnScoreThreshold ?? 0}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -236,7 +235,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.executionLogging, false)}
|
?checked=${this.instance?.executionLogging ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -272,7 +271,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.checkStaticRules, true)}
|
?checked=${this.instance?.checkStaticRules ?? true}
|
||||||
@change=${(ev: Event) => {
|
@change=${(ev: Event) => {
|
||||||
const el = ev.target as HTMLInputElement;
|
const el = ev.target as HTMLInputElement;
|
||||||
this.showStatic = el.checked;
|
this.showStatic = el.checked;
|
||||||
@ -291,7 +290,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.checkHaveIBeenPwned, true)}
|
?checked=${this.instance?.checkHaveIBeenPwned ?? true}
|
||||||
@change=${(ev: Event) => {
|
@change=${(ev: Event) => {
|
||||||
const el = ev.target as HTMLInputElement;
|
const el = ev.target as HTMLInputElement;
|
||||||
this.showHIBP = el.checked;
|
this.showHIBP = el.checked;
|
||||||
@ -316,7 +315,7 @@ export class PasswordPolicyForm extends BasePolicyForm<PasswordPolicy> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.checkZxcvbn, true)}
|
?checked=${this.instance?.checkZxcvbn ?? true}
|
||||||
@change=${(ev: Event) => {
|
@change=${(ev: Event) => {
|
||||||
const el = ev.target as HTMLInputElement;
|
const el = ev.target as HTMLInputElement;
|
||||||
this.showZxcvbn = el.checked;
|
this.showZxcvbn = el.checked;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ doesn't pass when either or both of the selected options are equal or above the
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.executionLogging, false)}
|
?checked=${this.instance?.executionLogging ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -84,7 +83,7 @@ doesn't pass when either or both of the selected options are equal or above the
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.checkIp, true)}
|
?checked=${this.instance?.checkIp ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -99,7 +98,7 @@ doesn't pass when either or both of the selected options are equal or above the
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.checkUsername, false)}
|
?checked=${this.instance?.checkUsername ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
import { BasePolicyForm } from "@goauthentik/admin/policies/BasePolicyForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
@ -51,7 +50,7 @@ export class UniquePasswordPolicyForm extends BasePolicyForm<UniquePasswordPolic
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.executionLogging, false)}
|
?checked=${this.instance?.executionLogging ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -88,7 +87,7 @@ export class UniquePasswordPolicyForm extends BasePolicyForm<UniquePasswordPolic
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.numHistoricalPasswords, 1)}"
|
value="${this.instance?.numHistoricalPasswords ?? 1}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import { Form } from "@goauthentik/elements/forms/Form";
|
import { Form } from "@goauthentik/elements/forms/Form";
|
||||||
@ -181,7 +180,7 @@ export class PolicyTestForm extends Form<PropertyMappingTestRequest> {
|
|||||||
<ak-form-element-horizontal label=${msg("Context")} name="context">
|
<ak-form-element-horizontal label=${msg("Context")} name="context">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value=${YAML.stringify(first(this.request?.context, {}))}
|
value=${YAML.stringify(this.request?.context ?? {})}
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">${this.renderExampleButtons()}</p>
|
<p class="pf-c-form__helper-text">${this.renderExampleButtons()}</p>
|
||||||
|
@ -42,7 +42,7 @@ export class ProviderViewPage extends AKElement {
|
|||||||
|
|
||||||
renderProvider(): TemplateResult {
|
renderProvider(): TemplateResult {
|
||||||
if (!this.provider) {
|
if (!this.provider) {
|
||||||
return html`<ak-empty-state ?loading=${true} ?fullHeight=${true}></ak-empty-state>`;
|
return html`<ak-empty-state loading ?fullHeight=${true}></ak-empty-state>`;
|
||||||
}
|
}
|
||||||
switch (this.provider?.component) {
|
switch (this.provider?.component) {
|
||||||
case "ak-provider-saml-form":
|
case "ak-provider-saml-form":
|
||||||
|
@ -4,7 +4,6 @@ import {
|
|||||||
propertyMappingsSelector,
|
propertyMappingsSelector,
|
||||||
} from "@goauthentik/admin/providers/google_workspace/GoogleWorkspaceProviderFormHelpers.js";
|
} from "@goauthentik/admin/providers/google_workspace/GoogleWorkspaceProviderFormHelpers.js";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
@ -68,7 +67,7 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
|
|||||||
>
|
>
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.JavaScript}
|
mode=${CodeMirrorMode.JavaScript}
|
||||||
.value="${first(this.instance?.credentials, {})}"
|
.value="${this.instance?.credentials ?? {}}"
|
||||||
></ak-codemirror>
|
></ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
${msg("Google Cloud credentials file.")}
|
${msg("Google Cloud credentials file.")}
|
||||||
@ -81,7 +80,7 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
value="${first(this.instance?.delegatedSubject, "")}"
|
value="${this.instance?.delegatedSubject ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -98,7 +97,7 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.defaultGroupEmailDomain, "")}"
|
value="${this.instance?.defaultGroupEmailDomain ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -166,7 +165,7 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.dryRun, false)}
|
?checked=${this.instance?.dryRun ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -191,7 +190,7 @@ export class GoogleWorkspaceProviderFormPage extends BaseProviderForm<GoogleWork
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.excludeUsersServiceAccount, true)}
|
?checked=${this.instance?.excludeUsersServiceAccount ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -4,7 +4,6 @@ import {
|
|||||||
propertyMappingsSelector,
|
propertyMappingsSelector,
|
||||||
} from "@goauthentik/admin/providers/microsoft_entra/MicrosoftEntraProviderFormHelpers.js";
|
} from "@goauthentik/admin/providers/microsoft_entra/MicrosoftEntraProviderFormHelpers.js";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider.js";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
@ -66,7 +65,7 @@ export class MicrosoftEntraProviderFormPage extends BaseProviderForm<MicrosoftEn
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.clientId, "")}"
|
value="${this.instance?.clientId ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -81,7 +80,7 @@ export class MicrosoftEntraProviderFormPage extends BaseProviderForm<MicrosoftEn
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.clientSecret, "")}"
|
value="${this.instance?.clientSecret ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -96,7 +95,7 @@ export class MicrosoftEntraProviderFormPage extends BaseProviderForm<MicrosoftEn
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.tenantId, "")}"
|
value="${this.instance?.tenantId ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -155,7 +154,7 @@ export class MicrosoftEntraProviderFormPage extends BaseProviderForm<MicrosoftEn
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.dryRun, false)}
|
?checked=${this.instance?.dryRun ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -180,7 +179,7 @@ export class MicrosoftEntraProviderFormPage extends BaseProviderForm<MicrosoftEn
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.excludeUsersServiceAccount, true)}
|
?checked=${this.instance?.excludeUsersServiceAccount ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -4,7 +4,7 @@ import {
|
|||||||
IRedirectURIInput,
|
IRedirectURIInput,
|
||||||
akOAuthRedirectURIInput,
|
akOAuthRedirectURIInput,
|
||||||
} from "@goauthentik/admin/providers/oauth2/OAuth2ProviderRedirectURI";
|
} from "@goauthentik/admin/providers/oauth2/OAuth2ProviderRedirectURI";
|
||||||
import { ascii_letters, digits, first, randomString } from "@goauthentik/common/utils";
|
import { ascii_letters, digits, randomString } from "@goauthentik/common/utils";
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "@goauthentik/components/ak-radio-input";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "@goauthentik/components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-textarea-input";
|
import "@goauthentik/components/ak-textarea-input";
|
||||||
@ -161,7 +161,7 @@ export function renderForm(
|
|||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="clientId"
|
name="clientId"
|
||||||
label=${msg("Client ID")}
|
label=${msg("Client ID")}
|
||||||
value="${first(provider?.clientId, randomString(40, ascii_letters + digits))}"
|
value="${provider?.clientId ?? randomString(40, ascii_letters + digits)}"
|
||||||
required
|
required
|
||||||
inputHint="code"
|
inputHint="code"
|
||||||
>
|
>
|
||||||
@ -169,10 +169,7 @@ export function renderForm(
|
|||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="clientSecret"
|
name="clientSecret"
|
||||||
label=${msg("Client Secret")}
|
label=${msg("Client Secret")}
|
||||||
value="${first(
|
value="${provider?.clientSecret ?? randomString(128, ascii_letters + digits)}"
|
||||||
provider?.clientSecret,
|
|
||||||
randomString(128, ascii_letters + digits),
|
|
||||||
)}"
|
|
||||||
inputHint="code"
|
inputHint="code"
|
||||||
?hidden=${!showClientSecret}
|
?hidden=${!showClientSecret}
|
||||||
>
|
>
|
||||||
@ -257,7 +254,7 @@ export function renderForm(
|
|||||||
label=${msg("Access code validity")}
|
label=${msg("Access code validity")}
|
||||||
inputHint="code"
|
inputHint="code"
|
||||||
required
|
required
|
||||||
value="${first(provider?.accessCodeValidity, "minutes=1")}"
|
value="${provider?.accessCodeValidity ?? "minutes=1"}"
|
||||||
.bighelp=${html`<p class="pf-c-form__helper-text">
|
.bighelp=${html`<p class="pf-c-form__helper-text">
|
||||||
${msg("Configure how long access codes are valid for.")}
|
${msg("Configure how long access codes are valid for.")}
|
||||||
</p>
|
</p>
|
||||||
@ -267,7 +264,7 @@ export function renderForm(
|
|||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="accessTokenValidity"
|
name="accessTokenValidity"
|
||||||
label=${msg("Access Token validity")}
|
label=${msg("Access Token validity")}
|
||||||
value="${first(provider?.accessTokenValidity, "minutes=5")}"
|
value="${provider?.accessTokenValidity ?? "minutes=5"}"
|
||||||
inputHint="code"
|
inputHint="code"
|
||||||
required
|
required
|
||||||
.bighelp=${html` <p class="pf-c-form__helper-text">
|
.bighelp=${html` <p class="pf-c-form__helper-text">
|
||||||
@ -280,7 +277,7 @@ export function renderForm(
|
|||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="refreshTokenValidity"
|
name="refreshTokenValidity"
|
||||||
label=${msg("Refresh Token validity")}
|
label=${msg("Refresh Token validity")}
|
||||||
value="${first(provider?.refreshTokenValidity, "days=30")}"
|
value="${provider?.refreshTokenValidity ?? "days=30"}"
|
||||||
inputHint="code"
|
inputHint="code"
|
||||||
?required=${true}
|
?required=${true}
|
||||||
.bighelp=${html` <p class="pf-c-form__helper-text">
|
.bighelp=${html` <p class="pf-c-form__helper-text">
|
||||||
@ -317,7 +314,7 @@ export function renderForm(
|
|||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="includeClaimsInIdToken"
|
name="includeClaimsInIdToken"
|
||||||
label=${msg("Include claims in id_token")}
|
label=${msg("Include claims in id_token")}
|
||||||
?checked=${first(provider?.includeClaimsInIdToken, true)}
|
?checked=${provider?.includeClaimsInIdToken ?? true}
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint.",
|
"Include User claims from scopes in the id_token, for applications that don't access the userinfo endpoint.",
|
||||||
)}
|
)}
|
||||||
|
@ -432,7 +432,7 @@ export class OAuth2ProviderViewPage extends AKElement {
|
|||||||
<div class="pf-c-card__body">
|
<div class="pf-c-card__body">
|
||||||
${this.preview
|
${this.preview
|
||||||
? html`<pre>${JSON.stringify(this.preview?.preview, null, 4)}</pre>`
|
? html`<pre>${JSON.stringify(this.preview?.preview, null, 4)}</pre>`
|
||||||
: html` <ak-empty-state ?loading=${true}></ak-empty-state> `}
|
: html` <ak-empty-state loading></ak-empty-state> `}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
@ -3,7 +3,6 @@ import "@goauthentik/admin/providers/proxy/ProxyProviderForm";
|
|||||||
import "@goauthentik/admin/rbac/ObjectPermissionsPage";
|
import "@goauthentik/admin/rbac/ObjectPermissionsPage";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { EVENT_REFRESH } from "@goauthentik/common/constants";
|
import { EVENT_REFRESH } from "@goauthentik/common/constants";
|
||||||
import { convertToSlug } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-status-label";
|
import "@goauthentik/components/ak-status-label";
|
||||||
import "@goauthentik/components/events/ObjectChangelog";
|
import "@goauthentik/components/events/ObjectChangelog";
|
||||||
import MDCaddyStandalone from "@goauthentik/docs/add-secure-apps/providers/proxy/_caddy_standalone.md";
|
import MDCaddyStandalone from "@goauthentik/docs/add-secure-apps/providers/proxy/_caddy_standalone.md";
|
||||||
@ -22,6 +21,7 @@ import type { Replacer } from "@goauthentik/elements/ak-mdx";
|
|||||||
import "@goauthentik/elements/buttons/ModalButton";
|
import "@goauthentik/elements/buttons/ModalButton";
|
||||||
import "@goauthentik/elements/buttons/SpinnerButton";
|
import "@goauthentik/elements/buttons/SpinnerButton";
|
||||||
import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
|
import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
|
||||||
|
import { formatSlug } from "@goauthentik/elements/router/utils.js";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
import { CSSResult, PropertyValues, TemplateResult, css, html } from "lit";
|
import { CSSResult, PropertyValues, TemplateResult, css, html } from "lit";
|
||||||
@ -183,7 +183,7 @@ export class ProxyProviderViewPage extends AKElement {
|
|||||||
return html`<ak-tabs pageIdentifier="proxy-setup">
|
return html`<ak-tabs pageIdentifier="proxy-setup">
|
||||||
${servers.map((server) => {
|
${servers.map((server) => {
|
||||||
return html`<section
|
return html`<section
|
||||||
slot="page-${convertToSlug(server.label)}"
|
slot="page-${formatSlug(server.label)}"
|
||||||
data-tab-title="${server.label}"
|
data-tab-title="${server.label}"
|
||||||
class="pf-c-page__main-section pf-m-no-padding-mobile ak-markdown-section"
|
class="pf-c-page__main-section pf-m-no-padding-mobile ak-markdown-section"
|
||||||
>
|
>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "@goauthentik/components/ak-radio-input";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
@ -99,7 +98,7 @@ export class EndpointForm extends ModelForm<Endpoint, string> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.maximumConnections, 1)}"
|
value="${this.instance?.maximumConnections ?? 1}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -123,7 +122,7 @@ export class EndpointForm extends ModelForm<Endpoint, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Settings")} name="settings">
|
<ak-form-element-horizontal label=${msg("Settings")} name="settings">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode="yaml"
|
mode="yaml"
|
||||||
value="${YAML.stringify(first(this.instance?.settings, {}))}"
|
value="${YAML.stringify(this.instance?.settings ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">${msg("Connection settings.")}</p>
|
<p class="pf-c-form__helper-text">${msg("Connection settings.")}</p>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import "@goauthentik/admin/common/ak-crypto-certificate-search";
|
import "@goauthentik/admin/common/ak-crypto-certificate-search";
|
||||||
import "@goauthentik/admin/common/ak-flow-search/ak-branded-flow-search";
|
import "@goauthentik/admin/common/ak-flow-search/ak-branded-flow-search";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
@ -82,7 +81,7 @@ export class RACProviderFormPage extends ModelForm<RACProvider, number> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.connectionExpiry, "hours=8")}"
|
value="${this.instance?.connectionExpiry ?? "hours=8"}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -100,7 +99,7 @@ export class RACProviderFormPage extends ModelForm<RACProvider, number> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.deleteTokenOnDisconnect, false)}
|
?checked=${this.instance?.deleteTokenOnDisconnect ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -135,7 +134,7 @@ export class RACProviderFormPage extends ModelForm<RACProvider, number> {
|
|||||||
<ak-form-element-horizontal label=${msg("Settings")} name="settings">
|
<ak-form-element-horizontal label=${msg("Settings")} name="settings">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode="yaml"
|
mode="yaml"
|
||||||
value="${YAML.stringify(first(this.instance?.settings, {}))}"
|
value="${YAML.stringify(this.instance?.settings ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">${msg("Connection settings.")}</p>
|
<p class="pf-c-form__helper-text">${msg("Connection settings.")}</p>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import "@goauthentik/admin/common/ak-flow-search/ak-branded-flow-search";
|
import "@goauthentik/admin/common/ak-flow-search/ak-branded-flow-search";
|
||||||
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
||||||
import { ascii_letters, digits, first, randomString } from "@goauthentik/common/utils";
|
import { ascii_letters, digits, randomString } from "@goauthentik/common/utils";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "@goauthentik/elements/forms/SearchSelect";
|
||||||
@ -78,17 +78,14 @@ export function renderForm(
|
|||||||
name="sharedSecret"
|
name="sharedSecret"
|
||||||
label=${msg("Shared secret")}
|
label=${msg("Shared secret")}
|
||||||
.errorMessages=${errors?.sharedSecret ?? []}
|
.errorMessages=${errors?.sharedSecret ?? []}
|
||||||
value=${first(
|
value=${provider?.sharedSecret ?? randomString(128, ascii_letters + digits)}
|
||||||
provider?.sharedSecret,
|
|
||||||
randomString(128, ascii_letters + digits),
|
|
||||||
)}
|
|
||||||
required
|
required
|
||||||
inputHint="code"
|
inputHint="code"
|
||||||
></ak-text-input>
|
></ak-text-input>
|
||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="clientNetworks"
|
name="clientNetworks"
|
||||||
label=${msg("Client Networks")}
|
label=${msg("Client Networks")}
|
||||||
value=${first(provider?.clientNetworks, "0.0.0.0/0, ::/0")}
|
value=${provider?.clientNetworks ?? "0.0.0.0/0, ::/0"}
|
||||||
.errorMessages=${errors?.clientNetworks ?? []}
|
.errorMessages=${errors?.clientNetworks ?? []}
|
||||||
required
|
required
|
||||||
help=${clientNetworksHelp}
|
help=${clientNetworksHelp}
|
||||||
|
@ -502,7 +502,7 @@ export class SAMLProviderViewPage extends AKElement {
|
|||||||
|
|
||||||
renderTabPreview(): TemplateResult {
|
renderTabPreview(): TemplateResult {
|
||||||
if (!this.preview) {
|
if (!this.preview) {
|
||||||
return html`<ak-empty-state ?loading=${true}></ak-empty-state>`;
|
return html`<ak-empty-state loading></ak-empty-state>`;
|
||||||
}
|
}
|
||||||
return html` <div
|
return html` <div
|
||||||
class="pf-c-page__main-section pf-m-no-padding-mobile pf-l-grid pf-m-gutter"
|
class="pf-c-page__main-section pf-m-no-padding-mobile pf-l-grid pf-m-gutter"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -37,7 +36,7 @@ export function renderForm(provider?: Partial<SCIMProvider>, errors: ValidationE
|
|||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="url"
|
name="url"
|
||||||
label=${msg("URL")}
|
label=${msg("URL")}
|
||||||
value="${first(provider?.url, "")}"
|
value="${provider?.url ?? ""}"
|
||||||
.errorMessages=${errors?.url ?? []}
|
.errorMessages=${errors?.url ?? []}
|
||||||
required
|
required
|
||||||
help=${msg("SCIM base url, usually ends in /v2.")}
|
help=${msg("SCIM base url, usually ends in /v2.")}
|
||||||
@ -96,7 +95,7 @@ export function renderForm(provider?: Partial<SCIMProvider>, errors: ValidationE
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(provider?.dryRun, false)}
|
?checked=${provider?.dryRun ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -119,7 +118,7 @@ export function renderForm(provider?: Partial<SCIMProvider>, errors: ValidationE
|
|||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="excludeUsersServiceAccount"
|
name="excludeUsersServiceAccount"
|
||||||
label=${msg("Exclude service accounts")}
|
label=${msg("Exclude service accounts")}
|
||||||
?checked=${first(provider?.excludeUsersServiceAccount, true)}
|
?checked=${provider?.excludeUsersServiceAccount ?? true}
|
||||||
>
|
>
|
||||||
</ak-switch-input>
|
</ak-switch-input>
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import {
|
|||||||
oauth2ProvidersSelector,
|
oauth2ProvidersSelector,
|
||||||
} from "@goauthentik/admin/providers/oauth2/OAuth2ProvidersProvider";
|
} from "@goauthentik/admin/providers/oauth2/OAuth2ProvidersProvider";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "@goauthentik/components/ak-text-input";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider.js";
|
||||||
@ -81,7 +80,7 @@ export class SSFProviderFormPage extends BaseProviderForm<SSFProvider> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(provider?.eventRetention, "days=30")}"
|
value="${provider?.eventRetention ?? "days=30"}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -34,7 +34,7 @@ export class SourceViewPage extends AKElement {
|
|||||||
|
|
||||||
renderSource(): TemplateResult {
|
renderSource(): TemplateResult {
|
||||||
if (!this.source) {
|
if (!this.source) {
|
||||||
return html`<ak-empty-state ?loading=${true} ?fullHeight=${true}></ak-empty-state>`;
|
return html`<ak-empty-state loading ?fullHeight=${true}></ak-empty-state>`;
|
||||||
}
|
}
|
||||||
switch (this.source?.component) {
|
switch (this.source?.component) {
|
||||||
case "ak-source-kerberos-form":
|
case "ak-source-kerberos-form":
|
||||||
|
@ -6,7 +6,6 @@ import {
|
|||||||
UserMatchingModeToLabel,
|
UserMatchingModeToLabel,
|
||||||
} from "@goauthentik/admin/sources/oauth/utils";
|
} from "@goauthentik/admin/sources/oauth/utils";
|
||||||
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "@goauthentik/components/ak-switch-input";
|
||||||
import "@goauthentik/components/ak-text-input";
|
import "@goauthentik/components/ak-text-input";
|
||||||
import "@goauthentik/components/ak-textarea-input";
|
import "@goauthentik/components/ak-textarea-input";
|
||||||
@ -97,12 +96,12 @@ export class KerberosSourceForm extends WithCapabilitiesConfig(BaseSourceForm<Ke
|
|||||||
></ak-text-input>
|
></ak-text-input>
|
||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="enabled"
|
name="enabled"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
label=${msg("Enabled")}
|
label=${msg("Enabled")}
|
||||||
></ak-switch-input>
|
></ak-switch-input>
|
||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="passwordLoginUpdateInternalPassword"
|
name="passwordLoginUpdateInternalPassword"
|
||||||
?checked=${first(this.instance?.passwordLoginUpdateInternalPassword, false)}
|
?checked=${this.instance?.passwordLoginUpdateInternalPassword ?? false}
|
||||||
label=${msg("Update internal password on login")}
|
label=${msg("Update internal password on login")}
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"When the user logs in to authentik using this source password backend, update their credentials in authentik.",
|
"When the user logs in to authentik using this source password backend, update their credentials in authentik.",
|
||||||
@ -110,12 +109,12 @@ export class KerberosSourceForm extends WithCapabilitiesConfig(BaseSourceForm<Ke
|
|||||||
></ak-switch-input>
|
></ak-switch-input>
|
||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="syncUsers"
|
name="syncUsers"
|
||||||
?checked=${first(this.instance?.syncUsers, true)}
|
?checked=${this.instance?.syncUsers ?? true}
|
||||||
label=${msg("Sync users")}
|
label=${msg("Sync users")}
|
||||||
></ak-switch-input>
|
></ak-switch-input>
|
||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="syncUsersPassword"
|
name="syncUsersPassword"
|
||||||
?checked=${first(this.instance?.syncUsersPassword, true)}
|
?checked=${this.instance?.syncUsersPassword ?? true}
|
||||||
label=${msg("User password writeback")}
|
label=${msg("User password writeback")}
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"Enable this option to write password changes made in authentik back to Kerberos. Ignored if sync is disabled.",
|
"Enable this option to write password changes made in authentik back to Kerberos. Ignored if sync is disabled.",
|
||||||
@ -395,10 +394,8 @@ export class KerberosSourceForm extends WithCapabilitiesConfig(BaseSourceForm<Ke
|
|||||||
<ak-text-input
|
<ak-text-input
|
||||||
name="userPathTemplate"
|
name="userPathTemplate"
|
||||||
label=${msg("User path")}
|
label=${msg("User path")}
|
||||||
value=${first(
|
value=${this.instance?.userPathTemplate ??
|
||||||
this.instance?.userPathTemplate,
|
"goauthentik.io/sources/%(slug)s"}
|
||||||
"goauthentik.io/sources/%(slug)s",
|
|
||||||
)}
|
|
||||||
help=${placeholderHelperText}
|
help=${placeholderHelperText}
|
||||||
></ak-text-input>
|
></ak-text-input>
|
||||||
</div>
|
</div>
|
||||||
@ -443,7 +440,7 @@ export class KerberosSourceForm extends WithCapabilitiesConfig(BaseSourceForm<Ke
|
|||||||
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.icon, "")}"
|
value="${this.instance?.icon ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">${iconHelperText}</p>
|
<p class="pf-c-form__helper-text">${iconHelperText}</p>
|
||||||
|
@ -2,7 +2,6 @@ import "@goauthentik/admin/common/ak-crypto-certificate-search";
|
|||||||
import { placeholderHelperText } from "@goauthentik/admin/helperText";
|
import { placeholderHelperText } from "@goauthentik/admin/helperText";
|
||||||
import { BaseSourceForm } from "@goauthentik/admin/sources/BaseSourceForm";
|
import { BaseSourceForm } from "@goauthentik/admin/sources/BaseSourceForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -67,7 +66,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -82,7 +81,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.passwordLoginUpdateInternalPassword, false)}
|
?checked=${this.instance?.passwordLoginUpdateInternalPassword ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -104,7 +103,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.syncUsers, true)}
|
?checked=${this.instance?.syncUsers ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -119,7 +118,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.syncUsersPassword, true)}
|
?checked=${this.instance?.syncUsersPassword ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -139,7 +138,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.syncGroups, true)}
|
?checked=${this.instance?.syncGroups ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -173,7 +172,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.startTls, true)}
|
?checked=${this.instance?.startTls ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -191,7 +190,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.sni, false)}
|
?checked=${this.instance?.sni ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -335,10 +334,8 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.userPathTemplate ??
|
||||||
this.instance?.userPathTemplate,
|
"goauthentik.io/sources/%(slug)s"}"
|
||||||
"goauthentik.io/sources/%(slug)s",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
||||||
@ -421,7 +418,7 @@ export class LDAPSourceForm extends BaseSourceForm<LDAPSource> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.lookupGroupsFromUser, false)}
|
?checked=${this.instance?.lookupGroupsFromUser ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -6,7 +6,6 @@ import {
|
|||||||
UserMatchingModeToLabel,
|
UserMatchingModeToLabel,
|
||||||
} from "@goauthentik/admin/sources/oauth/utils";
|
} from "@goauthentik/admin/sources/oauth/utils";
|
||||||
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-radio-input";
|
import "@goauthentik/components/ak-radio-input";
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
@ -136,11 +135,9 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.authorizationUrl ??
|
||||||
this.instance?.authorizationUrl,
|
this.providerType.authorizationUrl ??
|
||||||
this.providerType.authorizationUrl,
|
""}"
|
||||||
"",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -152,11 +149,9 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
<ak-form-element-horizontal label=${msg("Access token URL")} name="accessTokenUrl">
|
<ak-form-element-horizontal label=${msg("Access token URL")} name="accessTokenUrl">
|
||||||
<input
|
<input
|
||||||
type="url"
|
type="url"
|
||||||
value="${first(
|
value="${this.instance?.accessTokenUrl ??
|
||||||
this.instance?.accessTokenUrl,
|
this.providerType.accessTokenUrl ??
|
||||||
this.providerType.accessTokenUrl,
|
""}"
|
||||||
"",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -168,11 +163,7 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
<ak-form-element-horizontal label=${msg("Profile URL")} name="profileUrl">
|
<ak-form-element-horizontal label=${msg("Profile URL")} name="profileUrl">
|
||||||
<input
|
<input
|
||||||
type="url"
|
type="url"
|
||||||
value="${first(
|
value="${this.instance?.profileUrl ?? this.providerType.profileUrl ?? ""}"
|
||||||
this.instance?.profileUrl,
|
|
||||||
this.providerType.profileUrl,
|
|
||||||
"",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -188,7 +179,7 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="url"
|
type="url"
|
||||||
value="${first(this.instance?.requestTokenUrl, "")}"
|
value="${this.instance?.requestTokenUrl ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
/>
|
/>
|
||||||
@ -207,11 +198,9 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="url"
|
type="url"
|
||||||
value="${first(
|
value="${this.instance?.oidcWellKnownUrl ??
|
||||||
this.instance?.oidcWellKnownUrl,
|
this.providerType.oidcWellKnownUrl ??
|
||||||
this.providerType.oidcWellKnownUrl,
|
""}"
|
||||||
"",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -231,11 +220,9 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="url"
|
type="url"
|
||||||
value="${first(
|
value="${this.instance?.oidcJwksUrl ??
|
||||||
this.instance?.oidcJwksUrl,
|
this.providerType.oidcJwksUrl ??
|
||||||
this.providerType.oidcJwksUrl,
|
""}"
|
||||||
"",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -249,7 +236,7 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
<ak-form-element-horizontal label=${msg("OIDC JWKS")} name="oidcJwks">
|
<ak-form-element-horizontal label=${msg("OIDC JWKS")} name="oidcJwks">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.JavaScript}
|
mode=${CodeMirrorMode.JavaScript}
|
||||||
value="${JSON.stringify(first(this.instance?.oidcJwks, {}))}"
|
value="${JSON.stringify(this.instance?.oidcJwks ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">${msg("Raw JWKS data.")}</p>
|
<p class="pf-c-form__helper-text">${msg("Raw JWKS data.")}</p>
|
||||||
@ -296,7 +283,7 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -381,10 +368,7 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.userPathTemplate ?? "goauthentik.io/sources/%(slug)s"}"
|
||||||
this.instance?.userPathTemplate,
|
|
||||||
"goauthentik.io/sources/%(slug)s",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -432,7 +416,7 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.icon, "")}"
|
value="${this.instance?.icon ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -474,7 +458,7 @@ export class OAuthSourceForm extends WithCapabilitiesConfig(BaseSourceForm<OAuth
|
|||||||
<ak-form-element-horizontal label=${msg("Scopes")} name="additionalScopes">
|
<ak-form-element-horizontal label=${msg("Scopes")} name="additionalScopes">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.additionalScopes, "")}"
|
value="${this.instance?.additionalScopes ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
} from "@goauthentik/admin/sources/oauth/utils";
|
} from "@goauthentik/admin/sources/oauth/utils";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { PlexAPIClient, PlexResource, popupCenterScreen } from "@goauthentik/common/helpers/plex";
|
import { PlexAPIClient, PlexResource, popupCenterScreen } from "@goauthentik/common/helpers/plex";
|
||||||
import { ascii_letters, digits, first, randomString } from "@goauthentik/common/utils";
|
import { ascii_letters, digits, randomString } from "@goauthentik/common/utils";
|
||||||
import {
|
import {
|
||||||
CapabilitiesEnum,
|
CapabilitiesEnum,
|
||||||
WithCapabilitiesConfig,
|
WithCapabilitiesConfig,
|
||||||
@ -137,7 +137,7 @@ export class PlexSourceForm extends WithCapabilitiesConfig(BaseSourceForm<PlexSo
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.allowFriends, true)}
|
?checked=${this.instance?.allowFriends ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -198,7 +198,7 @@ export class PlexSourceForm extends WithCapabilitiesConfig(BaseSourceForm<PlexSo
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -283,10 +283,7 @@ export class PlexSourceForm extends WithCapabilitiesConfig(BaseSourceForm<PlexSo
|
|||||||
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.userPathTemplate ?? "goauthentik.io/sources/%(slug)s"}"
|
||||||
this.instance?.userPathTemplate,
|
|
||||||
"goauthentik.io/sources/%(slug)s",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
||||||
@ -332,7 +329,7 @@ export class PlexSourceForm extends WithCapabilitiesConfig(BaseSourceForm<PlexSo
|
|||||||
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.icon, "")}"
|
value="${this.instance?.icon ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">${iconHelperText}</p>
|
<p class="pf-c-form__helper-text">${iconHelperText}</p>
|
||||||
@ -347,7 +344,7 @@ export class PlexSourceForm extends WithCapabilitiesConfig(BaseSourceForm<PlexSo
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.clientId, "")}"
|
value="${this.instance?.clientId ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -7,7 +7,6 @@ import {
|
|||||||
UserMatchingModeToLabel,
|
UserMatchingModeToLabel,
|
||||||
} from "@goauthentik/admin/sources/oauth/utils";
|
} from "@goauthentik/admin/sources/oauth/utils";
|
||||||
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG, config } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import {
|
import {
|
||||||
CapabilitiesEnum,
|
CapabilitiesEnum,
|
||||||
WithCapabilitiesConfig,
|
WithCapabilitiesConfig,
|
||||||
@ -105,7 +104,7 @@ export class SAMLSourceForm extends WithCapabilitiesConfig(BaseSourceForm<SAMLSo
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -228,7 +227,7 @@ export class SAMLSourceForm extends WithCapabilitiesConfig(BaseSourceForm<SAMLSo
|
|||||||
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
: html`<ak-form-element-horizontal label=${msg("Icon")} name="icon">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.icon, "")}"
|
value="${this.instance?.icon ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">${iconHelperText}</p>
|
<p class="pf-c-form__helper-text">${iconHelperText}</p>
|
||||||
@ -334,7 +333,7 @@ export class SAMLSourceForm extends WithCapabilitiesConfig(BaseSourceForm<SAMLSo
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.allowIdpInitiated, false)}
|
?checked=${this.instance?.allowIdpInitiated ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -397,10 +396,8 @@ export class SAMLSourceForm extends WithCapabilitiesConfig(BaseSourceForm<SAMLSo
|
|||||||
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.userPathTemplate ??
|
||||||
this.instance?.userPathTemplate,
|
"goauthentik.io/sources/%(slug)s"}"
|
||||||
"goauthentik.io/sources/%(slug)s",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { placeholderHelperText } from "@goauthentik/admin/helperText";
|
import { placeholderHelperText } from "@goauthentik/admin/helperText";
|
||||||
import { BaseSourceForm } from "@goauthentik/admin/sources/BaseSourceForm";
|
import { BaseSourceForm } from "@goauthentik/admin/sources/BaseSourceForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -63,7 +62,7 @@ export class SCIMSourceForm extends BaseSourceForm<SCIMSource> {
|
|||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
class="pf-c-check__input"
|
class="pf-c-check__input"
|
||||||
?checked=${first(this.instance?.enabled, true)}
|
?checked=${this.instance?.enabled ?? true}
|
||||||
/>
|
/>
|
||||||
<label class="pf-c-check__label"> ${msg("Enabled")} </label>
|
<label class="pf-c-check__label"> ${msg("Enabled")} </label>
|
||||||
</div>
|
</div>
|
||||||
@ -111,10 +110,8 @@ export class SCIMSourceForm extends BaseSourceForm<SCIMSource> {
|
|||||||
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
<ak-form-element-horizontal label=${msg("User path")} name="userPathTemplate">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(
|
value="${this.instance?.userPathTemplate ??
|
||||||
this.instance?.userPathTemplate,
|
"goauthentik.io/sources/%(slug)s"}"
|
||||||
"goauthentik.io/sources/%(slug)s",
|
|
||||||
)}"
|
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
<p class="pf-c-form__helper-text">${placeholderHelperText}</p>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "@goauthentik/elements/forms/SearchSelect";
|
||||||
@ -50,7 +49,7 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -62,7 +61,7 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.friendlyName, "")}"
|
value="${this.instance?.friendlyName ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -78,7 +77,7 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.apiHostname, "")}"
|
value="${this.instance?.apiHostname ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -95,7 +94,7 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.clientId, "")}"
|
value="${this.instance?.clientId ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -132,7 +131,7 @@ export class AuthenticatorDuoStageForm extends BaseStageForm<AuthenticatorDuoSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.adminIntegrationKey, "")}"
|
value="${this.instance?.adminIntegrationKey ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/Radio";
|
import "@goauthentik/elements/forms/Radio";
|
||||||
@ -65,7 +64,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
<ak-form-element-horizontal label=${msg("SMTP Port")} ?required=${true} name="port">
|
<ak-form-element-horizontal label=${msg("SMTP Port")} ?required=${true} name="port">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.port, 25)}"
|
value="${this.instance?.port ?? 25}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -89,7 +88,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.useTls, true)}
|
?checked=${this.instance?.useTls ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -104,7 +103,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.useSsl, false)}
|
?checked=${this.instance?.useSsl ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -121,7 +120,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.timeout, 30)}"
|
value="${this.instance?.timeout ?? 30}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -150,7 +149,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -162,7 +161,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.friendlyName, "")}"
|
value="${this.instance?.friendlyName ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -176,7 +175,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.useGlobalSettings, true)}
|
?checked=${this.instance?.useGlobalSettings ?? true}
|
||||||
@change=${(ev: Event) => {
|
@change=${(ev: Event) => {
|
||||||
const target = ev.target as HTMLInputElement;
|
const target = ev.target as HTMLInputElement;
|
||||||
this.showConnectionSettings = !target.checked;
|
this.showConnectionSettings = !target.checked;
|
||||||
@ -206,7 +205,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.subject, "authentik Sign-in code")}"
|
value="${this.instance?.subject ?? "authentik Sign-in code"}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -221,7 +220,7 @@ export class AuthenticatorEmailStageForm extends BaseStageForm<AuthenticatorEmai
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.tokenExpiry, "minutes=15")}"
|
value="${this.instance?.tokenExpiry ?? "minutes=15"}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
@ -52,7 +51,7 @@ export class AuthenticatorEndpointGDTCStageForm extends BaseStageForm<Authentica
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} required name="name">
|
<ak-form-element-horizontal label=${msg("Name")} required name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -67,7 +66,7 @@ export class AuthenticatorEndpointGDTCStageForm extends BaseStageForm<Authentica
|
|||||||
>
|
>
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.JavaScript}
|
mode=${CodeMirrorMode.JavaScript}
|
||||||
.value="${first(this.instance?.credentials, {})}"
|
.value="${this.instance?.credentials ?? {}}"
|
||||||
></ak-codemirror>
|
></ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
${msg("Google Cloud credentials file.")}
|
${msg("Google Cloud credentials file.")}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/Radio";
|
import "@goauthentik/elements/forms/Radio";
|
||||||
@ -66,7 +65,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.accountSid, "")}"
|
value="${this.instance?.accountSid ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -83,7 +82,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.auth, "")}"
|
value="${this.instance?.auth ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -129,7 +128,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.accountSid, "")}"
|
value="${this.instance?.accountSid ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -146,7 +145,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.auth, "")}"
|
value="${this.instance?.auth ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -164,7 +163,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.authPassword, "")}"
|
value="${this.instance?.authPassword ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -215,7 +214,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -227,7 +226,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.friendlyName, "")}"
|
value="${this.instance?.friendlyName ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -272,7 +271,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.fromNumber, "")}"
|
value="${this.instance?.fromNumber ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -290,7 +289,7 @@ export class AuthenticatorSMSStageForm extends BaseStageForm<AuthenticatorSMSSta
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.verifyOnly, false)}
|
?checked=${this.instance?.verifyOnly ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "@goauthentik/elements/forms/SearchSelect";
|
||||||
|
|
||||||
@ -48,7 +47,7 @@ export class AuthenticatorStaticStageForm extends BaseStageForm<AuthenticatorSta
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -60,7 +59,7 @@ export class AuthenticatorStaticStageForm extends BaseStageForm<AuthenticatorSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.friendlyName, "")}"
|
value="${this.instance?.friendlyName ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -79,7 +78,7 @@ export class AuthenticatorStaticStageForm extends BaseStageForm<AuthenticatorSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.tokenCount, 6)}"
|
value="${this.instance?.tokenCount ?? 6}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -96,7 +95,7 @@ export class AuthenticatorStaticStageForm extends BaseStageForm<AuthenticatorSta
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.tokenLength, 12)}"
|
value="${this.instance?.tokenLength ?? 12}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/SearchSelect";
|
import "@goauthentik/elements/forms/SearchSelect";
|
||||||
@ -50,7 +49,7 @@ export class AuthenticatorTOTPStageForm extends BaseStageForm<AuthenticatorTOTPS
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -62,7 +61,7 @@ export class AuthenticatorTOTPStageForm extends BaseStageForm<AuthenticatorTOTPS
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.friendlyName, "")}"
|
value="${this.instance?.friendlyName ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -2,7 +2,6 @@ import { RenderFlowOption } from "@goauthentik/admin/flows/utils";
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { deviceTypeRestrictionPair } from "@goauthentik/admin/stages/authenticator_webauthn/utils";
|
import { deviceTypeRestrictionPair } from "@goauthentik/admin/stages/authenticator_webauthn/utils";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-provider";
|
||||||
import { DataProvision } from "@goauthentik/elements/ak-dual-select/types";
|
import { DataProvision } from "@goauthentik/elements/ak-dual-select/types";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -58,7 +57,7 @@ export class AuthenticatorWebAuthnStageForm extends BaseStageForm<AuthenticatorW
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -70,7 +69,7 @@ export class AuthenticatorWebAuthnStageForm extends BaseStageForm<AuthenticatorW
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.friendlyName, "")}"
|
value="${this.instance?.friendlyName ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/components/ak-number-input";
|
import "@goauthentik/components/ak-number-input";
|
||||||
import "@goauthentik/components/ak-switch-input";
|
import "@goauthentik/components/ak-switch-input";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
@ -118,7 +117,7 @@ export class CaptchaStageForm extends BaseStageForm<CaptchaStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.errorOnInvalidScore, true)}
|
?checked=${this.instance?.errorOnInvalidScore ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
import { msg } from "@lit/localize";
|
import { msg } from "@lit/localize";
|
||||||
@ -50,7 +49,7 @@ export class DummyStageForm extends BaseStageForm<DummyStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.throwError, false)}
|
?checked=${this.instance?.throwError ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/utils/TimeDeltaHelp";
|
import "@goauthentik/elements/utils/TimeDeltaHelp";
|
||||||
@ -62,7 +61,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
<ak-form-element-horizontal label=${msg("SMTP Port")} ?required=${true} name="port">
|
<ak-form-element-horizontal label=${msg("SMTP Port")} ?required=${true} name="port">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.port, 25)}"
|
value="${this.instance?.port ?? 25}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -86,7 +85,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.useTls, true)}
|
?checked=${this.instance?.useTls ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -101,7 +100,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.useSsl, false)}
|
?checked=${this.instance?.useSsl ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -118,7 +117,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.timeout, 30)}"
|
value="${this.instance?.timeout ?? 30}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -161,7 +160,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.activateUserOnSuccess, true)}
|
?checked=${this.instance?.activateUserOnSuccess ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -183,7 +182,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.useGlobalSettings, true)}
|
?checked=${this.instance?.useGlobalSettings ?? true}
|
||||||
@change=${(ev: Event) => {
|
@change=${(ev: Event) => {
|
||||||
const target = ev.target as HTMLInputElement;
|
const target = ev.target as HTMLInputElement;
|
||||||
this.showConnectionSettings = !target.checked;
|
this.showConnectionSettings = !target.checked;
|
||||||
@ -209,7 +208,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.tokenExpiry, "minutes=30")}"
|
value="${this.instance?.tokenExpiry ?? "minutes=30"}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -225,7 +224,7 @@ export class EmailStageForm extends BaseStageForm<EmailStage> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.subject, "authentik")}"
|
value="${this.instance?.subject ?? "authentik"}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first, groupBy } from "@goauthentik/common/utils";
|
import { groupBy } from "@goauthentik/common/utils";
|
||||||
import "@goauthentik/components/ak-switch-input.js";
|
import "@goauthentik/components/ak-switch-input.js";
|
||||||
import "@goauthentik/elements/ak-checkbox-group/ak-checkbox-group.js";
|
import "@goauthentik/elements/ak-checkbox-group/ak-checkbox-group.js";
|
||||||
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
import "@goauthentik/elements/ak-dual-select/ak-dual-select-dynamic-selected-provider.js";
|
||||||
@ -162,7 +162,7 @@ export class IdentificationStageForm extends BaseStageForm<IdentificationStage>
|
|||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="caseInsensitiveMatching"
|
name="caseInsensitiveMatching"
|
||||||
label=${msg("Case insensitive matching")}
|
label=${msg("Case insensitive matching")}
|
||||||
?checked=${first(this.instance?.caseInsensitiveMatching, true)}
|
?checked=${this.instance?.caseInsensitiveMatching ?? true}
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"When enabled, user fields are matched regardless of their casing.",
|
"When enabled, user fields are matched regardless of their casing.",
|
||||||
)}
|
)}
|
||||||
@ -170,7 +170,7 @@ export class IdentificationStageForm extends BaseStageForm<IdentificationStage>
|
|||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="pretendUserExists"
|
name="pretendUserExists"
|
||||||
label=${msg("Pretend user exists")}
|
label=${msg("Pretend user exists")}
|
||||||
?checked=${first(this.instance?.pretendUserExists, true)}
|
?checked=${this.instance?.pretendUserExists ?? true}
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"When enabled, the stage will always accept the given user identifier and continue.",
|
"When enabled, the stage will always accept the given user identifier and continue.",
|
||||||
)}
|
)}
|
||||||
@ -178,7 +178,7 @@ export class IdentificationStageForm extends BaseStageForm<IdentificationStage>
|
|||||||
<ak-switch-input
|
<ak-switch-input
|
||||||
name="showMatchedUser"
|
name="showMatchedUser"
|
||||||
label=${msg("Show matched user")}
|
label=${msg("Show matched user")}
|
||||||
?checked=${first(this.instance?.showMatchedUser, true)}
|
?checked=${this.instance?.showMatchedUser ?? true}
|
||||||
help=${msg(
|
help=${msg(
|
||||||
"When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown.",
|
"When a valid username/email has been entered, and this option is enabled, the user's username and avatar will be shown. Otherwise, the text that the user entered will be shown.",
|
||||||
)}
|
)}
|
||||||
@ -218,7 +218,7 @@ export class IdentificationStageForm extends BaseStageForm<IdentificationStage>
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.showSourceLabels, false)}
|
?checked=${this.instance?.showSourceLabels ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
import "@goauthentik/admin/common/ak-flow-search/ak-flow-search";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { dateTimeLocal } from "@goauthentik/common/temporal";
|
import { dateTimeLocal } from "@goauthentik/common/temporal";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -63,7 +62,7 @@ export class InvitationForm extends ModelForm<Invitation, string> {
|
|||||||
data-type="datetime-local"
|
data-type="datetime-local"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
value="${dateTimeLocal(first(this.instance?.expires, new Date()))}"
|
value="${dateTimeLocal(this.instance?.expires ?? new Date())}"
|
||||||
/>
|
/>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
<ak-form-element-horizontal label=${msg("Flow")} name="flow">
|
<ak-form-element-horizontal label=${msg("Flow")} name="flow">
|
||||||
@ -80,7 +79,7 @@ export class InvitationForm extends ModelForm<Invitation, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Custom attributes")} name="fixedData">
|
<ak-form-element-horizontal label=${msg("Custom attributes")} name="fixedData">
|
||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value="${YAML.stringify(first(this.instance?.fixedData, {}))}"
|
value="${YAML.stringify(this.instance?.fixedData ?? {})}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
<p class="pf-c-form__helper-text">
|
<p class="pf-c-form__helper-text">
|
||||||
@ -94,7 +93,7 @@ export class InvitationForm extends ModelForm<Invitation, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.singleUse, true)}
|
?checked=${this.instance?.singleUse ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
|
|
||||||
@ -51,10 +50,7 @@ export class InvitationStageForm extends BaseStageForm<InvitationStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(
|
?checked=${this.instance?.continueFlowWithoutInvitation ?? false}
|
||||||
this.instance?.continueFlowWithoutInvitation,
|
|
||||||
false,
|
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { parseAPIResponseError, pluckErrorDetail } from "@goauthentik/common/errors/network";
|
import { parseAPIResponseError, pluckErrorDetail } from "@goauthentik/common/errors/network";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -269,7 +268,7 @@ export class PromptForm extends ModelForm<Prompt, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.required, false)}
|
?checked=${this.instance?.required ?? false}
|
||||||
@change=${() => {
|
@change=${() => {
|
||||||
this._shouldRefresh = true;
|
this._shouldRefresh = true;
|
||||||
}}
|
}}
|
||||||
@ -287,7 +286,7 @@ export class PromptForm extends ModelForm<Prompt, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.placeholderExpression, false)}
|
?checked=${this.instance?.placeholderExpression ?? false}
|
||||||
@change=${() => {
|
@change=${() => {
|
||||||
this._shouldRefresh = true;
|
this._shouldRefresh = true;
|
||||||
}}
|
}}
|
||||||
@ -330,7 +329,7 @@ export class PromptForm extends ModelForm<Prompt, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.initialValueExpression, false)}
|
?checked=${this.instance?.initialValueExpression ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -376,7 +375,7 @@ export class PromptForm extends ModelForm<Prompt, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Order")} ?required=${true} name="order">
|
<ak-form-element-horizontal label=${msg("Order")} ?required=${true} name="order">
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value="${first(this.instance?.order, 0)}"
|
value="${this.instance?.order ?? 0}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/Alert";
|
import "@goauthentik/elements/Alert";
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -38,7 +37,7 @@ export class UserLoginStageForm extends BaseStageForm<UserLoginStage> {
|
|||||||
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
<ak-form-element-horizontal label=${msg("Name")} ?required=${true} name="name">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.name, "")}"
|
value="${this.instance?.name ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -53,7 +52,7 @@ export class UserLoginStageForm extends BaseStageForm<UserLoginStage> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.sessionDuration, "seconds=0")}"
|
value="${this.instance?.sessionDuration ?? "seconds=0"}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -84,7 +83,7 @@ export class UserLoginStageForm extends BaseStageForm<UserLoginStage> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.rememberMeOffset, "seconds=0")}"
|
value="${this.instance?.rememberMeOffset ?? "seconds=0"}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -170,7 +169,7 @@ export class UserLoginStageForm extends BaseStageForm<UserLoginStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.terminateOtherSessions, false)}
|
?checked=${this.instance?.terminateOtherSessions ?? false}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
import { BaseStageForm } from "@goauthentik/admin/stages/BaseStageForm";
|
||||||
import { UserCreationModeEnum } from "@goauthentik/api/dist/models/UserCreationModeEnum";
|
import { UserCreationModeEnum } from "@goauthentik/api/dist/models/UserCreationModeEnum";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import "@goauthentik/elements/forms/Radio";
|
import "@goauthentik/elements/forms/Radio";
|
||||||
@ -95,7 +94,7 @@ export class UserWriteStageForm extends BaseStageForm<UserWriteStage> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.createUsersAsInactive, true)}
|
?checked=${this.instance?.createUsersAsInactive ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -149,7 +148,7 @@ export class UserWriteStageForm extends BaseStageForm<UserWriteStage> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.userPathTemplate, "")}"
|
value="${this.instance?.userPathTemplate ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { dateTimeLocal } from "@goauthentik/common/temporal";
|
import { dateTimeLocal } from "@goauthentik/common/temporal";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/forms/FormGroup";
|
import "@goauthentik/elements/forms/FormGroup";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
import { ModelForm } from "@goauthentik/elements/forms/ModelForm";
|
||||||
@ -50,7 +49,7 @@ export class TokenForm extends ModelForm<Token, string> {
|
|||||||
<input
|
<input
|
||||||
type="datetime-local"
|
type="datetime-local"
|
||||||
data-type="datetime-local"
|
data-type="datetime-local"
|
||||||
value="${dateTimeLocal(first(this.instance?.expires, new Date()))}"
|
value="${dateTimeLocal(this.instance?.expires ?? new Date())}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
</ak-form-element-horizontal>`;
|
</ak-form-element-horizontal>`;
|
||||||
@ -64,7 +63,7 @@ export class TokenForm extends ModelForm<Token, string> {
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.identifier, "")}"
|
value="${this.instance?.identifier ?? ""}"
|
||||||
class="pf-c-form-control pf-m-monospace"
|
class="pf-c-form-control pf-m-monospace"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
spellcheck="false"
|
spellcheck="false"
|
||||||
@ -123,7 +122,7 @@ export class TokenForm extends ModelForm<Token, string> {
|
|||||||
<ak-form-element-horizontal label=${msg("Description")} name="description">
|
<ak-form-element-horizontal label=${msg("Description")} name="description">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.description, "")}"
|
value="${this.instance?.description ?? ""}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
/>
|
/>
|
||||||
</ak-form-element-horizontal>
|
</ak-form-element-horizontal>
|
||||||
@ -132,7 +131,7 @@ export class TokenForm extends ModelForm<Token, string> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.expiring, true)}
|
?checked=${this.instance?.expiring ?? true}
|
||||||
@change=${(ev: Event) => {
|
@change=${(ev: Event) => {
|
||||||
const el = ev.target as HTMLInputElement;
|
const el = ev.target as HTMLInputElement;
|
||||||
this.showExpiry = el.checked;
|
this.showExpiry = el.checked;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import "@goauthentik/admin/users/GroupSelectModal";
|
import "@goauthentik/admin/users/GroupSelectModal";
|
||||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
import "@goauthentik/elements/CodeMirror";
|
import "@goauthentik/elements/CodeMirror";
|
||||||
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
import { CodeMirrorMode } from "@goauthentik/elements/CodeMirror";
|
||||||
import "@goauthentik/elements/forms/HorizontalFormElement";
|
import "@goauthentik/elements/forms/HorizontalFormElement";
|
||||||
@ -159,7 +158,7 @@ export class UserForm extends ModelForm<User, number> {
|
|||||||
<input
|
<input
|
||||||
class="pf-c-switch__input"
|
class="pf-c-switch__input"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
?checked=${first(this.instance?.isActive, true)}
|
?checked=${this.instance?.isActive ?? true}
|
||||||
/>
|
/>
|
||||||
<span class="pf-c-switch__toggle">
|
<span class="pf-c-switch__toggle">
|
||||||
<span class="pf-c-switch__toggle-icon">
|
<span class="pf-c-switch__toggle-icon">
|
||||||
@ -177,7 +176,7 @@ export class UserForm extends ModelForm<User, number> {
|
|||||||
<ak-form-element-horizontal label=${msg("Path")} ?required=${true} name="path">
|
<ak-form-element-horizontal label=${msg("Path")} ?required=${true} name="path">
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.path, this.defaultPath)}"
|
value="${this.instance?.path ?? this.defaultPath}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
@ -190,7 +189,7 @@ export class UserForm extends ModelForm<User, number> {
|
|||||||
<ak-codemirror
|
<ak-codemirror
|
||||||
mode=${CodeMirrorMode.YAML}
|
mode=${CodeMirrorMode.YAML}
|
||||||
value="${YAML.stringify(
|
value="${YAML.stringify(
|
||||||
first(this.instance?.attributes, UserForm.defaultUserAttributes),
|
this.instance?.attributes ?? UserForm.defaultUserAttributes,
|
||||||
)}"
|
)}"
|
||||||
>
|
>
|
||||||
</ak-codemirror>
|
</ak-codemirror>
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import { SentryIgnoredError } from "@goauthentik/common/sentry";
|
|
||||||
|
|
||||||
import { CSSResult, css } from "lit";
|
import { CSSResult, css } from "lit";
|
||||||
|
|
||||||
export function getCookie(name: string): string {
|
export function getCookie(name: string): string {
|
||||||
@ -18,19 +16,6 @@ export function getCookie(name: string): string {
|
|||||||
return cookieValue;
|
return cookieValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function convertToSlug(text: string): string {
|
|
||||||
return text
|
|
||||||
.toLowerCase()
|
|
||||||
.replace(/ /g, "-")
|
|
||||||
.replace(/[^\w-]+/g, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
export function isSlug(text: string): boolean {
|
|
||||||
const lowered = text.toLowerCase();
|
|
||||||
const forbidden = /([^\w-]|\s)/.test(lowered);
|
|
||||||
return lowered === text && !forbidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Truncate a string based on maximum word count
|
* Truncate a string based on maximum word count
|
||||||
*/
|
*/
|
||||||
@ -74,16 +59,6 @@ export function groupBy<T>(objects: T[], callback: (obj: T) => string): Array<[s
|
|||||||
return Array.from(m).sort();
|
return Array.from(m).sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function first<T>(...args: Array<T | undefined | null>): T {
|
|
||||||
for (let index = 0; index < args.length; index++) {
|
|
||||||
const element = args[index];
|
|
||||||
if (element !== undefined && element !== null) {
|
|
||||||
return element;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new SentryIgnoredError(`No compatible arg given: ${args}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Taken from python's string module
|
// Taken from python's string module
|
||||||
export const ascii_lowercase = "abcdefghijklmnopqrstuvwxyz";
|
export const ascii_lowercase = "abcdefghijklmnopqrstuvwxyz";
|
||||||
export const ascii_uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
export const ascii_uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
@ -96,7 +71,9 @@ export const punctuation = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
|
|||||||
export function randomString(len: number, charset: string): string {
|
export function randomString(len: number, charset: string): string {
|
||||||
const chars = [];
|
const chars = [];
|
||||||
const array = new Uint8Array(len);
|
const array = new Uint8Array(len);
|
||||||
self.crypto.getRandomValues(array);
|
|
||||||
|
crypto.getRandomValues(array);
|
||||||
|
|
||||||
for (let index = 0; index < len; index++) {
|
for (let index = 0; index < len; index++) {
|
||||||
chars.push(charset[Math.floor(charset.length * (array[index] / Math.pow(2, 8)))]);
|
chars.push(charset[Math.floor(charset.length * (array[index] / Math.pow(2, 8)))]);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import { first } from "@goauthentik/common/utils";
|
|
||||||
|
|
||||||
import { TemplateResult, html, nothing } from "lit";
|
import { TemplateResult, html, nothing } from "lit";
|
||||||
import { classMap } from "lit/directives/class-map.js";
|
import { classMap } from "lit/directives/class-map.js";
|
||||||
import { map } from "lit/directives/map.js";
|
import { map } from "lit/directives/map.js";
|
||||||
@ -80,10 +78,10 @@ export function renderDescriptionList(
|
|||||||
) {
|
) {
|
||||||
const checkedTerms = alignTermType(terms);
|
const checkedTerms = alignTermType(terms);
|
||||||
const classes = classMap({
|
const classes = classMap({
|
||||||
"pf-m-horizontal": first(config.horizontal, false),
|
"pf-m-horizontal": config.horizontal ?? false,
|
||||||
"pf-m-compact": first(config.compact, false),
|
"pf-m-compact": config.compact ?? false,
|
||||||
"pf-m-2-col-on-lg": first(config.twocolumn, false),
|
"pf-m-2-col-on-lg": config.twocolumn ?? false,
|
||||||
"pf-m-3-col-on-lg": first(config.threecolumn, false),
|
"pf-m-3-col-on-lg": config.threecolumn ?? false,
|
||||||
});
|
});
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { convertToSlug } from "@goauthentik/common/utils";
|
import { formatSlug } from "@goauthentik/elements/router/utils.js";
|
||||||
|
|
||||||
import { html } from "lit";
|
import { html } from "lit";
|
||||||
import { customElement, property, query } from "lit/decorators.js";
|
import { customElement, property, query } from "lit/decorators.js";
|
||||||
@ -34,7 +34,7 @@ export class AkSlugInput extends HorizontalLightComponent<string> {
|
|||||||
// Do not stop propagation of this event; it must be sent up the tree so that a parent
|
// Do not stop propagation of this event; it must be sent up the tree so that a parent
|
||||||
// component, such as a custom forms manager, may receive it.
|
// component, such as a custom forms manager, may receive it.
|
||||||
handleTouch(ev: Event) {
|
handleTouch(ev: Event) {
|
||||||
this.input.value = convertToSlug(this.input.value);
|
this.input.value = formatSlug(this.input.value);
|
||||||
this.value = this.input.value;
|
this.value = this.input.value;
|
||||||
|
|
||||||
if (this.origin && this.origin.value === "" && this.input.value === "") {
|
if (this.origin && this.origin.value === "" && this.input.value === "") {
|
||||||
@ -67,7 +67,7 @@ export class AkSlugInput extends HorizontalLightComponent<string> {
|
|||||||
// "any event which adds or removes a character but leaves the rest of the slug looking like
|
// "any event which adds or removes a character but leaves the rest of the slug looking like
|
||||||
// the previous iteration, set it to the current iteration."
|
// the previous iteration, set it to the current iteration."
|
||||||
|
|
||||||
const newSlug = convertToSlug(ev.target.value);
|
const newSlug = formatSlug(ev.target.value);
|
||||||
const oldSlug = this.input.value;
|
const oldSlug = this.input.value;
|
||||||
const [shorter, longer] =
|
const [shorter, longer] =
|
||||||
newSlug.length < oldSlug.length ? [newSlug, oldSlug] : [oldSlug, newSlug];
|
newSlug.length < oldSlug.length ? [newSlug, oldSlug] : [oldSlug, newSlug];
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user