Skip to content

Commit 6fb3ab9

Browse files
committed
📝 Updated README and docstrings
1 parent e7e3cdb commit 6fb3ab9

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ To do this, you will need to provide the `--redis-host` and `--redis-port` argum
2626

2727
### Configure background refresh [Optional]
2828

29-
By default Apricot will refresh on demand when the data is older than 60 seconds.
30-
If it takes a long time to fetch all users and groups, or you want to ensure that each request prompty gets a respose, you may want to configure background refresh to have it periodically be refreshed in the background.
29+
By default Apricot will refresh the LDAP tree whenever it is accessed and it contains data older than 60 seconds.
30+
If it takes a long time to fetch all users and groups, or you want to ensure that each request gets a prompt response, you may want to configure background refresh to have it periodically be refreshed in the background.
3131

32-
This is enabled with the `--background-refresh` flag, which uses the `--refresh-interval=60` parameter as the interval to refresh the ldap database.
32+
This is enabled with the `--background-refresh` flag, which uses the `--refresh-interval` parameter as the interval to refresh the ldap database.
3333

3434
### Using TLS [Optional]
3535

apricot/ldap/oauth_ldap_server_factory.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ def __init__(
1212
self, domain: str, oauth_client: OAuthClient, *, background_refresh: bool, enable_mirrored_groups: bool, refresh_interval: int,
1313
):
1414
"""
15-
Initialise an LDAPServerFactory
15+
Initialise an OAuthLDAPServerFactory
1616
17+
@param background_refresh: Whether to refresh the LDAP tree in the background rather than on access
18+
@param domain: The root domain of the LDAP tree
19+
@param enable_mirrored_groups: Create a mirrored LDAP group-of-groups for each group-of-users
1720
@param oauth_client: An OAuth client used to construct the LDAP tree
21+
@param refresh_interval: Interval in seconds after which the tree must be refreshed
1822
"""
1923
# Create an LDAP lookup tree
2024
self.adaptor = OAuthLDAPTree(

apricot/ldap/oauth_ldap_tree.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def __init__(
2525
"""
2626
Initialise an OAuthLDAPTree
2727
28+
@param background_refresh: Whether to refresh the LDAP tree in the background rather than on access
2829
@param domain: The root domain of the LDAP tree
30+
@param enable_mirrored_groups: Create a mirrored LDAP group-of-groups for each group-of-users
2931
@param oauth_client: An OAuth client used to construct the LDAP tree
3032
@param refresh_interval: Interval in seconds after which the tree must be refreshed
3133
"""

apricot/oauth/oauth_data_adaptor.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ class OAuthDataAdaptor:
2424
def __init__(
2525
self, domain: str, oauth_client: OAuthClient, *, enable_mirrored_groups: bool
2626
):
27+
"""
28+
Initialise an OAuthDataAdaptor
29+
30+
@param domain: The root domain of the LDAP tree
31+
@param enable_mirrored_groups: Create a mirrored LDAP group-of-groups for each group-of-users
32+
@param oauth_client: An OAuth client used to construct the LDAP tree
33+
"""
2734
self.debug = oauth_client.debug
2835
self.oauth_client = oauth_client
2936
self.root_dn = "DC=" + domain.replace(".", ",DC=")

0 commit comments

Comments
 (0)