-
Notifications
You must be signed in to change notification settings - Fork 4
phenopipe web tech authentication
It is possible to implement your own Authenticator to tie in the Phenopipe application into your existing infrastructure (e.g. LDAP)
For this you need to implement a Python class inheriting from server.auth.base_authenticator.BaseAuthenticator
and override
its authenticate function and implement your custom logic.
The important thing is that the authenticate
method must return None if it wasn't successful and a dictionary containing
at least the following keys: 'username','name','surname','email','groups'. Be aware that this dict should not get too large because
it is used as a base for the generated JWT authentication tokens. Meaning that the information stored in it will
also be available on the client after the token is decoded.
To register your Authenticator to the system you have to call server.auth.authentication.register_authenticator
.
The order in which the authenticators are registered determines the order in which they are tried out when a user authenticates