Loading...
Searching...
No Matches
auth.h
Go to the documentation of this file.
#ifndef JANUS_AUTH_H
#define JANUS_AUTH_H
#include <glib.h>
#include "plugins/plugin.h"
void janus_auth_init(gboolean enabled, const char *secret);
gboolean janus_auth_is_enabled(void);
gboolean janus_auth_is_stored_mode(void);
gboolean janus_auth_is_signed_mode(void);
void janus_auth_deinit(void);
gboolean janus_auth_check_signature(const char *token, const char *realm);
gboolean janus_auth_check_signature_contains(const char *token, const char *realm, const char *desc);
gboolean janus_auth_add_token(const char *token);
gboolean janus_auth_check_token(const char *token);
GList *janus_auth_list_tokens(void);
gboolean janus_auth_remove_token(const char *token);
gboolean janus_auth_allow_plugin(const char *token, janus_plugin *plugin);
gboolean janus_auth_check_plugin(const char *token, janus_plugin *plugin);
GList *janus_auth_list_plugins(const char *token);
gboolean janus_auth_disallow_plugin(const char *token, janus_plugin *plugin);
#endif
janus_auth_check_plugin
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:284
janus_auth_add_token
gboolean janus_auth_add_token(const char *token)
Method to add a new valid token for authenticating.
Definition auth.c:179
janus_auth_allow_plugin
gboolean janus_auth_allow_plugin(const char *token, janus_plugin *plugin)
Method to allow a token to use a plugin.
Definition auth.c:250
janus_auth_is_enabled
gboolean janus_auth_is_enabled(void)
Method to check whether the mechanism is enabled or not.
Definition auth.c:65
janus_auth_remove_token
gboolean janus_auth_remove_token(const char *token)
Method to invalidate an existing token.
Definition auth.c:232
janus_auth_list_tokens
GList * janus_auth_list_tokens(void)
Method to return a list of the tokens.
Definition auth.c:213
janus_auth_deinit
void janus_auth_deinit(void)
Method to de-initialize the mechanism.
Definition auth.c:77
janus_auth_init
void janus_auth_init(gboolean enabled, const char *secret)
Method to initializing the token based authentication.
Definition auth.c:47
janus_auth_list_plugins
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:304
janus_auth_check_signature
gboolean janus_auth_check_signature(const char *token, const char *realm)
Method to check whether a signed token is valid.
Definition auth.c:90
janus_auth_is_stored_mode
gboolean janus_auth_is_stored_mode(void)
Method to check whether the mechanism is in stored-token mode or not.
Definition auth.c:69
janus_auth_is_signed_mode
gboolean janus_auth_is_signed_mode(void)
Method to check whether the mechanism is in signed-token mode or not.
Definition auth.c:73
janus_auth_check_token
gboolean janus_auth_check_token(const char *token)
Method to check whether a provided token is valid or not.
Definition auth.c:198
janus_auth_check_signature_contains
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:127
janus_auth_disallow_plugin
gboolean janus_auth_disallow_plugin(const char *token, janus_plugin *plugin)
Method to disallow a token to use a plugin.
Definition auth.c:321
plugin.h
Plugin-Core communication (implementation)
janus_plugin
The plugin session and callbacks interface.
Definition plugin.h:252