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 committed 2022-08-21 05:25:20 -04:00
1 parent fd5053ecac
commit 25d99207f0
1 file changed
+3
+3
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]