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 #include "plugins/plugin.h"
24 
28 void janus_auth_init(gboolean enabled, const char *secret);
30 gboolean janus_auth_is_enabled(void);
32 gboolean janus_auth_is_stored_mode(void);
34 void janus_auth_deinit(void);
35 
40 gboolean janus_auth_check_signature(const char *token, const char *realm);
46 gboolean janus_auth_check_signature_contains(const char *token, const char *realm, const char *desc);
47 
51 gboolean janus_auth_add_token(const char *token);
56 gboolean janus_auth_check_token(const char *token);
60 GList *janus_auth_list_tokens(void);
64 gboolean janus_auth_remove_token(const char *token);
65 
70 gboolean janus_auth_allow_plugin(const char *token, janus_plugin *plugin);
76 gboolean janus_auth_check_plugin(const char *token, janus_plugin *plugin);
81 GList *janus_auth_list_plugins(const char *token);
86 gboolean janus_auth_disallow_plugin(const char *token, janus_plugin *plugin);
87 
88 #endif
gboolean janus_auth_remove_token(const char *token)
Method to invalidate an existing token.
Definition: auth.c:225
gboolean janus_auth_add_token(const char *token)
Method to add a new valid token for authenticating.
Definition: auth.c:172
gboolean janus_auth_check_signature(const char *token, const char *realm)
Method to check whether a signed token is valid.
Definition: auth.c:86
Plugin-Core communication (implementation)
gboolean janus_auth_check_plugin(const char *token, janus_plugin *plugin)
Method to check whether a provided token can access a specified plugin.
Definition: auth.c:277
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:297
void janus_auth_init(gboolean enabled, const char *secret)
Method to initializing the token based authentication.
Definition: auth.c:47
The plugin session and callbacks interface.
Definition: plugin.h:252
gboolean janus_auth_is_enabled(void)
Method to check whether the mechanism is enabled or not.
Definition: auth.c:65
GList * janus_auth_list_tokens(void)
Method to return a list of the tokens.
Definition: auth.c:206
gboolean janus_auth_is_stored_mode(void)
Method to check whether the mechanism is in stored-token mode or not.
Definition: auth.c:69
gboolean janus_auth_allow_plugin(const char *token, janus_plugin *plugin)
Method to allow a token to use a plugin.
Definition: auth.c:243
gboolean janus_auth_disallow_plugin(const char *token, janus_plugin *plugin)
Method to disallow a token to use a plugin.
Definition: auth.c:314
gboolean janus_auth_check_signature_contains(const char *token, const char *realm, const char *desc)
Method to verify a signed token contains a descriptor.
Definition: auth.c:123
void janus_auth_deinit(void)
Method to de-initialize the mechanism.
Definition: auth.c:73
gboolean janus_auth_check_token(const char *token)
Method to check whether a provided token is valid or not.
Definition: auth.c:191