linotp.lib package

This model contains the linotp processing logic


This is a decorator which can be used to mark functions as deprecated. It will result in a warning being emmitted when the function is used.


deprecated_methods - decorator function

mark linotp endpoints as deprecated when accessed with a http method in the provided list, eg.

@deprecated_methods([‘GET’]) def check()

1- A warning for the deprecation will be added to the docstring 2- A warning should be written in case that the ‘check’ endpoint is accessed using a Http GET request. The warning log itself should be implemented in the controllers before calling the method(in progress TODO)

Developer Note: the implementation is not completed: major shortcoming is that its

not possible to access the request method the function is called with.


deprecated_methods_list – a list of methods that are deprecated for the

end point. E.g. [“GET”] or [“POST”] or [“GET”, “POST”]


return the api path inc HTTP methods

  • utility for sphimx rendering of api docs: