Server Plugins
Flopsar provides a few functionalities implemented as plugins. These implementations can be easily replaced with user-defined implementations. In this version of Flopsar only Manager
supports plugins. There is one plugin currently available: authentication.
Flopsar provides a C API for writing custom implementations of plugins. In order to write a plugin, you need to include in your project the main header file plugin.h
, which can be downloaded from our GitHub repository. This file contains prototypes of functions to implement. The function below is the most important one and must be implemented. This function is called only once when the application loads the plugin.
When you call the function above you will be provided with two arguments. The p
argument is an opaque type representing your plugin. You should keep it since it is required when you register your plugin hooks. The p_conf
argument is a path to your plugin configuration file. The second argument is provided only if you specify it during the plugin installation.
Do not change the name of the function above. It must stay plugin_init
, otherwise a plugin will not be loaded.
Authentication Plugin
If you want to use your own authentication system, you must implement a plugin in order to be able to authenticate your users against this system.
There is a default implementation of the authentication plugin available at GitHub. Use it as an example to implement your own.
Last updated