linotp.controllers.manage module¶
manage controller - In provides the web gui management interface
- class linotp.controllers.manage.ManageController(name, install_name='', **kwargs)¶
Bases:
BaseController- after_request_funcs: t.Dict[ft.AppOrBlueprintKey, t.List[ft.AfterRequestCallable]]¶
A data structure of functions to call at the end of each request, in the format
{scope: [functions]}. Thescopekey is the name of a blueprint the functions are active for, orNonefor all requests.To register a function, use the
after_request()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.
- audittrail()¶
GET, POST /manage/audittrail
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This is the template for the audit trail TAB
- before_request_funcs: t.Dict[ft.AppOrBlueprintKey, t.List[ft.BeforeRequestCallable]]¶
A data structure of functions to call at the beginning of each request, in the format
{scope: [functions]}. Thescopekey is the name of a blueprint the functions are active for, orNonefor all requests.To register a function, use the
before_request()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.
- context()¶
GET /manage/context
provide session context for the manage ui - the output is structured similar to the userservice/context
NOTE: the context might be extended to further needs
- Returns:
linotp json response with detail structure containing the context information
- custom_style()¶
GET, POST /manage/custom_style
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
If this action was called, the user hasn’t created a custom css yet. To avoid hitting the debug console over and over, we serve an empty file.
- deferred_functions: t.List[DeferredSetupFunction]¶
- error_handler_spec: t.Dict[ft.AppOrBlueprintKey, t.Dict[t.Optional[int], t.Dict[t.Type[Exception], ft.ErrorHandlerCallable]]]¶
A data structure of registered error handlers, in the format
{scope: {code: {class: handler}}}. Thescopekey is the name of a blueprint the handlers are active for, orNonefor all requests. Thecodekey is the HTTP status code forHTTPException, orNonefor other exceptions. The innermost dictionary maps exception classes to handler functions.To register an error handler, use the
errorhandler()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.
- help(id=None)¶
GET, POST /manage/help
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This downloads the Manual
The filename will be the 3. part,ID https://172.16.200.6/manage/help/somehelp.pdf The file is downloaded through Flask!
- index()¶
GET, POST /manage/index
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This is the main function of the management web UI
- login()¶
GET, POST /manage/login
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
Render the Manage-UI login page
- name: str¶
- policies()¶
GET, POST /manage/policies
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This is the template for the policies TAB
- teardown_request_funcs: t.Dict[ft.AppOrBlueprintKey, t.List[ft.TeardownCallable]]¶
A data structure of functions to call at the end of each request even if an exception is raised, in the format
{scope: [functions]}. Thescopekey is the name of a blueprint the functions are active for, orNonefor all requests.To register a function, use the
teardown_request()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.
- template_context_processors: t.Dict[ft.AppOrBlueprintKey, t.List[ft.TemplateContextProcessorCallable]]¶
A data structure of functions to call to pass extra context values when rendering templates, in the format
{scope: [functions]}. Thescopekey is the name of a blueprint the functions are active for, orNonefor all requests.To register a function, use the
context_processor()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.
- tokeninfo()¶
GET, POST /manage/tokeninfo
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
this returns the contents of /admin/show?serial=xyz in an html format
- Parameters:
serial – the token serial
- Returns:
a json result with a boolean status and request result
- Raises:
Exception – if an error occurs an exception is serialized and returned
- tokentype()¶
GET, POST /manage/tokentype
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
render the tokentype info mako
- tokenview()¶
GET, POST /manage/tokenview
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This is the template for the token TAB
- tokenview_flexi()¶
GET, POST /manage/tokenview_flexi
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This function is used to fill the flexigrid. Unlike the complex /admin/show function, it only returns a simple array of the tokens.
- Parameters:
page –
query –
qtype –
sortname –
sortorder –
rp –
- Returns:
json result with a boolean status and request result
- Raises:
Exception – if an error occurs an exception is serialized and returned
- url_default_functions: t.Dict[ft.AppOrBlueprintKey, t.List[ft.URLDefaultCallable]]¶
A data structure of functions to call to modify the keyword arguments when generating URLs, in the format
{scope: [functions]}. Thescopekey is the name of a blueprint the functions are active for, orNonefor all requests.To register a function, use the
url_defaults()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.
- url_value_preprocessors: t.Dict[ft.AppOrBlueprintKey, t.List[ft.URLValuePreprocessorCallable]]¶
A data structure of functions to call to modify the keyword arguments passed to the view function, in the format
{scope: [functions]}. Thescopekey is the name of a blueprint the functions are active for, orNonefor all requests.To register a function, use the
url_value_preprocessor()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.
- userview()¶
GET, POST /manage/userview
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This is the template for the token TAB
- userview_flexi()¶
GET, POST /manage/userview_flexi
Deprecated since version 3.2: Requests using HTTP POST method (because it is only reading data). This endpoint will only be available via HTTP GET method in the future.
This function is used to fill the flexigrid. Unlike the complex /admin/userlist function, it only returns a simple array of the tokens.
- Parameters:
page –
query –
qtype –
sortname –
sortorder –
rp –
realm –
- Returns:
a json result with a boolean status and request result
- Raises:
Exception – if an error occurs an exception is serialized and returned
- view_functions: t.Dict[str, t.Callable]¶
A dictionary mapping endpoint names to view functions.
To register a view function, use the
route()decorator.This data structure is internal. It should not be modified directly and its format may change at any time.