iptsec 1.12.11devel
|
Plugin interface for authentication verification modules. More...
#include "sofia-sip/auth_module.h"
#include "sofia-sip/auth_digest.h"
#include "sofia-sip/auth_common.h"
#include <sofia-sip/msg_date.h>
#include <sofia-sip/su_md5.h>
#include <sofia-sip/htable.h>
Go to the source code of this file.
Data Structures | |
struct | auth_scheme |
Authentication scheme. More... | |
struct | auth_passwd_t |
User data structure. More... | |
struct | auth_mod_t |
Common data for authentication module. More... | |
Macros | |
#define | AUTH_PLUGIN_H |
Defined when <sofia-sip/auth_plugin.h> has been included. | |
Functions | |
auth_passwd_t * | auth_mod_getpass (auth_mod_t *am, char const *user, char const *realm) |
Get an passwd entry for user. | |
auth_passwd_t * | auth_mod_addpass (auth_mod_t *am, char const *user, char const *realm) |
Add a password entry. | |
int | auth_readdb_if_needed (auth_mod_t *am) |
Read authentication database only when needed. | |
int | auth_readdb (auth_mod_t *am) |
Read authentication database. | |
msg_auth_t * | auth_mod_credentials (msg_auth_t *auth, char const *scheme, char const *realm) |
Find a credential header with matching scheme and realm. | |
auth_mod_t * | auth_mod_alloc (auth_scheme_t *scheme, tag_type_t, tag_value_t,...) |
Allocate an authentication module instance. | |
int | auth_init_default (auth_mod_t *am, auth_scheme_t *base, su_root_t *root, tag_type_t tag, tag_value_t value,...) |
Initialize an authentication module instance. | |
void | auth_cancel_default (auth_mod_t *am, auth_status_t *as) |
Default cancel method. | |
void | auth_destroy_default (auth_mod_t *am) |
Default destroy method. | |
void | auth_method_basic (auth_mod_t *am, auth_status_t *as, msg_auth_t *auth, auth_challenger_t const *ach) |
Basic scheme. | |
void | auth_challenge_basic (auth_mod_t *am, auth_status_t *as, auth_challenger_t const *ach) |
Construct a challenge header for Basic authentication scheme. | |
msg_auth_t * | auth_digest_credentials (msg_auth_t *auth, char const *realm, char const *opaque) |
Digest scheme. | |
void | auth_method_digest (auth_mod_t *am, auth_status_t *as, msg_auth_t *au, auth_challenger_t const *ach) |
Authenticate a request with Digest authentication scheme. | |
void | auth_info_digest (auth_mod_t *am, auth_status_t *as, auth_challenger_t const *ach) |
Construct a info header for Digest authentication scheme. | |
void | auth_check_digest (auth_mod_t *am, auth_status_t *as, auth_response_t *ar, auth_challenger_t const *ach) |
Verify digest authentication. | |
void | auth_challenge_digest (auth_mod_t *am, auth_status_t *as, auth_challenger_t const *ach) |
Construct a challenge header for Digest authentication scheme. | |
isize_t | auth_generate_digest_nonce (auth_mod_t *am, char buffer[], size_t buffer_len, int nextnonce, msg_time_t now) |
Generate nonce parameter. | |
int | auth_validate_digest_nonce (auth_mod_t *am, auth_status_t *as, auth_response_t *ar, msg_time_t now) |
Validate nonce parameter. | |
int | auth_allow_check (auth_mod_t *am, auth_status_t *as) |
Check if request method is on always-allowed list. | |
void | auth_md5_hmac_init (auth_mod_t *am, su_md5_t *md5) |
Init md5 for MD5-based HMAC. | |
Plugin interface for authentication verification modules.
int auth_allow_check | ( | auth_mod_t * | am, |
auth_status_t * | as | ||
) |
Check if request method is on always-allowed list.
void auth_cancel_default | ( | auth_mod_t * | am, |
auth_status_t * | as | ||
) |
Default cancel method.
Default cancel method.
The auth_cancel_default() is the default member function called by auth_mod_cancel().
void auth_destroy_default | ( | auth_mod_t * | am | ) |
Default destroy method.
Default destroy method.
The auth_destroy_default() is the default member function called by auth_mod_destroy().
msg_auth_t * auth_digest_credentials | ( | msg_auth_t * | auth, |
char const * | realm, | ||
char const * | opaque | ||
) |
Digest scheme.
Digest scheme.
isize_t auth_generate_digest_nonce | ( | auth_mod_t * | am, |
char | buffer[], | ||
size_t | bsize, | ||
int | nextnonce, | ||
msg_time_t | now | ||
) |
Generate nonce parameter.
am | pointer to authentication module object |
buffer | string buffer for nonce [OUT] |
bsize | size of buffer [IN] |
nextnonce | true if this is a "nextnonce" [IN] |
now | current time [IN] |
int auth_init_default | ( | auth_mod_t * | am, |
auth_scheme_t * | base, | ||
su_root_t * | root, | ||
tag_type_t | tag, | ||
tag_value_t | value, | ||
... | |||
) |
Initialize an authentication module instance.
The function auth_mod_init_default() initializes an authentication module object used to authenticate the requests.
am | |
base | |
root | |
tag,value,... | tagged argument list |
void auth_method_basic | ( | auth_mod_t * | am, |
auth_status_t * | as, | ||
msg_auth_t * | au, | ||
auth_challenger_t const * | ach | ||
) |
Basic scheme.
Basic scheme.
auth_mod_t * auth_mod_alloc | ( | auth_scheme_t * | scheme, |
tag_type_t | tag, | ||
tag_value_t | value, | ||
... | |||
) |
Allocate an authentication module instance.
The function auth_mod_alloc() allocates an authentication module object.
int auth_validate_digest_nonce | ( | auth_mod_t * | am, |
auth_status_t * | as, | ||
auth_response_t * | ar, | ||
msg_time_t | now | ||
) |
Validate nonce parameter.
am | pointer to authentication module object |
as | authentication status structure [OUT] |
ar | decoded authentication response from client [IN] |
now | current time [IN] |