core: add user settable token durations
Details
This PR enables users to specify a non default lifetime for users created app application token. By the way, it enforces expires value on API side.
Closes #5881
Current limitation : maximum duration is currently not enforce in the UI but only on API side. This is because I haven't find yet an easy way to provide that piece of information to the UI without add a new API endpoint which would require additionnal work. Nevertheless, if the chosen expiration date is invalid, an error message is still thrown up to the use explaining why it has failed. In my opinion, this enforcement within the UI could be enforced in a future improvement.
Checklist
- [X] Local tests pass (
ak test authentik/) - [X] The code has been formatted (
make lint-fix)
If an API change has been made
- [] The API schema has been updated (
make gen-build)
If changes to the frontend have been made
- [X] The code has been formatted (
make web) - [X] The translation files have been updated (
make i18n-extract)
If applicable
- [X] The documentation has been updated
- [X] The documentation has been formatted (
make website)
Deploy Preview for authentik-storybook ready!
| Name | Link |
|---|---|
| Latest commit | 12736d043930867b0507ec6dacb986f346099f13 |
| Latest deploy log | https://app.netlify.com/sites/authentik-storybook/deploys/6616ab95f08f34000880de1f |
| Deploy Preview | https://deploy-preview-7410--authentik-storybook.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Codecov Report
Attention: Patch coverage is 31.03448% with 60 lines in your changes are missing coverage. Please review.
Project coverage is 45.89%. Comparing base (
633028c) to head (12736d0).
Additional details and impacted files
@@ Coverage Diff @@
## main #7410 +/- ##
===========================================
- Coverage 92.40% 45.89% -46.51%
===========================================
Files 646 646
Lines 31851 31926 +75
===========================================
- Hits 29431 14654 -14777
- Misses 2420 17272 +14852
| Flag | Coverage Δ | |
|---|---|---|
| e2e | 44.38% <31.03%> (-6.13%) |
:arrow_down: |
| integration | 26.33% <27.58%> (-0.02%) |
:arrow_down: |
| unit | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Deploy Preview for authentik ready!
| Name | Link |
|---|---|
| Latest commit | f81a02805dcb628a05e88e1d7893f16110121ca5 |
| Latest deploy log | https://app.netlify.com/sites/authentik/deploys/65d460ef4a652d0008156d77 |
| Deploy Preview | https://deploy-preview-7410--authentik.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Deploy Preview for authentik-docs ready!
| Name | Link |
|---|---|
| Latest commit | 12736d043930867b0507ec6dacb986f346099f13 |
| Latest deploy log | https://app.netlify.com/sites/authentik-docs/deploys/6616ab94e761610008caa6fd |
| Deploy Preview | https://deploy-preview-7410--authentik-docs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.