I’m in need of defining a custom authentication provider for a panel application.
The auth backend in question does not support OAuth (unfortunately), so I’ve been referencing the built-in basic auth provider to understand how to do this.
I’m a bit confused about how to achieve this. I’ve tried the following:
A subclass of tornado.web.RequestHandler, which is configured with panel.config.auth = [my class]
A subclass of bokeh.server.auth_provider.AuthProvider configured the same way.
A subclass of tornado.web.RequestHandler, configured with an entry point statement in my pyproject.toml file, and passing auth_provider = “my auth provider” to panel.serve()
A subclass of bokeh.server.auth_provider.AuthProvider, configured the same way.
Is there a working example somewhere of a provider which takes a username and password, and uses a custom validation method for checking that the password is valid?
Managed to figure it out! And my client agreed to me posting a sanitized version on the web for others to learn from. I’ll follow up here soon with a link to the code.
I came across your solution for implementing custom authentication with the Panel framework, and I’m interested in using it for my project. I am new to panel and web development and I have a few questions regarding your implementation:
Could you please provide more details on how the username and password are sent from the front end? Are you using HTML forms or any specific method for capturing and transmitting the credentials?
In your solution, are the login and logout pages HTML pages? If so, could you share an example or provide some insights into how you designed those pages?
Thank you for sharing your solution and the blog post. It has been helpful so far, and I appreciate any further guidance you can provide.