FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (4)
# Changelog
## [0.6.0](https://gitlab.developers.cam.ac.uk/uis/devops/iam/activate-account/api/compare/0.5.0...0.6.0) (2024-11-13)
### Features
* **config:** update token TTL and auto-refresh max TTL in REST_KNOX ([9828489](https://gitlab.developers.cam.ac.uk/uis/devops/iam/activate-account/api/commit/9828489a514f8b8b5a52ba3c169bcf80acb35033))
## [0.5.0](https://gitlab.developers.cam.ac.uk/uis/devops/iam/activate-account/api/compare/0.4.1...0.5.0) (2024-11-11)
### Features
......
......@@ -168,8 +168,8 @@ REST_FRAMEWORK = {
KNOX_TOKEN_MODEL = "authentication.AuthToken"
REST_KNOX = {
"TOKEN_TTL": timedelta(minutes=5),
"AUTO_REFRESH_MAX_TTL": timedelta(minutes=15),
"TOKEN_TTL": timedelta(minutes=20),
"AUTO_REFRESH_MAX_TTL": timedelta(minutes=30),
"AUTO_REFRESH": True,
"USER_SERIALIZER": "knox.serializers.UserSerializer",
"AUTH_HEADER_PREFIX": "Bearer",
......
......@@ -59,12 +59,12 @@ def test_expired_other_token_cleanup(get_login_response):
"delta,status_code,exists",
[
(
knox_settings.TOKEN_TTL - timedelta(minutes=1), # 4 minutes
knox_settings.TOKEN_TTL - timedelta(minutes=1), # 19 minutes
status.HTTP_200_OK,
True,
),
(
knox_settings.TOKEN_TTL, # 5 minutes
knox_settings.TOKEN_TTL, # 20 minutes
status.HTTP_200_OK,
True,
),
......@@ -72,7 +72,7 @@ def test_expired_other_token_cleanup(get_login_response):
knox_settings.TOKEN_TTL + timedelta(minutes=1),
status.HTTP_401_UNAUTHORIZED,
False,
), # 6 minutes
), # 21 minutes
],
)
def test_expired_current_token_cleanup(delta, status_code, exists, get_login_response):
......@@ -99,9 +99,9 @@ def test_expired_current_token_cleanup(delta, status_code, exists, get_login_res
@pytest.mark.parametrize(
"delta",
[
knox_settings.AUTO_REFRESH_MAX_TTL - timedelta(minutes=1), # 14 minutes
knox_settings.AUTO_REFRESH_MAX_TTL, # 15 minutes
knox_settings.AUTO_REFRESH_MAX_TTL + timedelta(minutes=1), # 16 minutes
knox_settings.AUTO_REFRESH_MAX_TTL - timedelta(minutes=1), # 29 minutes
knox_settings.AUTO_REFRESH_MAX_TTL, # 30 minutes
knox_settings.AUTO_REFRESH_MAX_TTL + timedelta(minutes=1), # 31 minutes
],
)
def test_renew_token(delta, get_login_response):
......
[tool.poetry]
name = "activate_account"
version = "0.5.0"
version = "0.6.0"
description = ""
authors = [ ]
readme = "README.md"
......