Skip to content

Commit a4b7b07

Browse files
Additional comment
1 parent 128fc3a commit a4b7b07

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/service_ml_forecast/middlewares/keycloak_middleware.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ class KeycloakTokenUserPayload(BaseModel):
7878

7979
@cached(ttl=30, cache=Cache.MEMORY, key="valid_issuers") # type: ignore[misc]
8080
async def _get_valid_issuers() -> list[str]:
81-
"""Construct the list of valid issuers based on the realms retrieved from OpenRemote.
81+
"""Construct the list of valid issuers based on the enabled realms retrieved from OpenRemote.
8282
8383
Returns:
8484
The list of valid issuers.
85+
86+
Remarks:
87+
The list of valid issuers is cached for 30 seconds to reduce the number of requests to the OpenRemote Manager.
8588
"""
8689
openremote_service = get_openremote_service()
8790
realms = openremote_service.get_realms()

0 commit comments

Comments
 (0)