authorization: implement permitted path registration

Allow components to register paths that bypass authentication
requirements.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-08-19 20:46:02 -04:00
parent fd5053ecac
commit 25d99207f0
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
1 changed files with 3 additions and 0 deletions

View File

@ -251,6 +251,9 @@ class Authorization:
self.server.register_notification("authorization:user_created")
self.server.register_notification("authorization:user_deleted")
def register_permited_path(self, path: str) -> None:
self.permitted_paths.add(path)
def _sync_user(self, username: str) -> None:
self.user_db[username] = self.users[username]