Fork me on GitHub
auth.h
Go to the documentation of this file.
1 
18 #ifndef _JANUS_AUTH_H
19 #define _JANUS_AUTH_H
20 
21 #include <glib.h>
22 
23 
26 void janus_auth_init(gboolean enabled);
28 gboolean janus_auth_is_enabled(void);
30 void janus_auth_deinit(void);
31 
35 gboolean janus_auth_add_token(const char *token);
39 gboolean janus_auth_check_token(const char *token);
43 GList *janus_auth_list_tokens(void);
47 gboolean janus_auth_remove_token(const char *token);
48 
53 gboolean janus_auth_allow_plugin(const char *token, void *plugin);
58 gboolean janus_auth_check_plugin(const char *token, void *plugin);
63 GList *janus_auth_list_plugins(const char *token);
68 gboolean janus_auth_disallow_plugin(const char *token, void *plugin);
69 
70 #endif
gboolean janus_auth_remove_token(const char *token)
Method to invalidate an existing token.
Definition: auth.c:111
gboolean janus_auth_add_token(const char *token)
Method to add a new valid token for authenticating.
Definition: auth.c:60
gboolean janus_auth_check_plugin(const char *token, void *plugin)
Method to check whether a provided token can access a specified plugin.
Definition: auth.c:163
GList * janus_auth_list_plugins(const char *token)
Method to return a list of the plugins a specific token has access to.
Definition: auth.c:181
gboolean janus_auth_allow_plugin(const char *token, void *plugin)
Method to allow a token to use a plugin.
Definition: auth.c:129
gboolean janus_auth_is_enabled(void)
Method to check whether the mechanism is enabled or not.
Definition: auth.c:44
GList * janus_auth_list_tokens(void)
Method to return a list of the tokens.
Definition: auth.c:92
gboolean janus_auth_disallow_plugin(const char *token, void *plugin)
Method to disallow a token to use a plugin.
Definition: auth.c:198
void janus_auth_init(gboolean enabled)
Method to initializing the token based authentication.
Definition: auth.c:32
void janus_auth_deinit(void)
Method to de-initialize the mechanism.
Definition: auth.c:48
gboolean janus_auth_check_token(const char *token)
Method to check whether a provided token is valid or not.
Definition: auth.c:79