Replies: 1 comment 1 reply
-
I don't no where you get that code from, but this is how it should look like: from asyncua.server.users import UserRole, User
class UserManager:
def get_user(self, iserver, username=None, password=None, certificate=None):
if username in users_db and password == users_db[username]:
return User(role=UserRole.User)
return None
async def main():
.....
server = Server(user_manager=UserManager())
..... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I am currently trying to create a user on my server with username and password. Unfortunately I always get the error message: "NoneType" object has no attribute "set_user_manager" at the line
server.user_manager.set_user_manager(user_manager)
.Does anyone know what the problem could be?
My Code:
Beta Was this translation helpful? Give feedback.
All reactions