qhana_plugin_runner.api.jwt_helper module
Module containing JWT security features for the API.
- class qhana_plugin_runner.api.jwt_helper.DemoUser(username: str)
Bases:
objectThis class should be replaced by the actual user class!
- qhana_plugin_runner.api.jwt_helper.JWT = <flask_jwt_extended.jwt_manager.JWTManager object>
Basic JWT security scheme.
- class qhana_plugin_runner.api.jwt_helper.JWTMixin
Bases:
objectExtend Blueprint to add security documentation and jwt handling
- qhana_plugin_runner.api.jwt_helper.JWT_REFRESH_SCHEME = {'bearerFormat': 'JWT', 'description': 'The jwt refresh token as returned by login. Must only be used to get a new access token.', 'scheme': 'bearer', 'type': 'http'}
Security schemes to be added to the swagger.json api documentation.
- qhana_plugin_runner.api.jwt_helper.JWT_SCHEME = {'bearerFormat': 'JWT', 'description': 'The jwt access token as returned by login or refresh.', 'scheme': 'bearer', 'type': 'http'}
JWT security scheme for JWT refresh tokens.
- qhana_plugin_runner.api.jwt_helper.register_jwt(app: Flask)
Register jwt manager with flask app.