Data Structures | Defines | Functions

sofia-sip/auth_plugin.h File Reference

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>
Include dependency graph for auth_plugin.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...

Defines

#define AUTH_PLUGIN_H
 Defined when <sofia-sip/auth_plugin.h> has been included.

Functions

auth_passwd_tauth_mod_getpass (auth_mod_t *am, char const *user, char const *realm)
 Get an passwd entry for user.
auth_passwd_tauth_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_tauth_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.

Detailed Description

Plugin interface for authentication verification modules.

Author:
Pekka Pessi <Pekka.Pessi@nokia-email.address.hidden>
Date:
Created: Tue Apr 27 15:22:07 2004 ppessi

Define Documentation

#define AUTH_PLUGIN_H

Defined when <sofia-sip/auth_plugin.h> has been included.


Function Documentation

int auth_allow_check ( auth_mod_t am,
auth_status_t as 
)

Check if request method is on always-allowed list.

Returns:
0 if allowed
1 otherwise
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_challenge_basic ( auth_mod_t am,
auth_status_t as,
auth_challenger_t const *  ach 
)

Construct a challenge header for Basic authentication scheme.

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.

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().

isize_t auth_generate_digest_nonce ( auth_mod_t am,
char  buffer[],
size_t  bsize,
int  nextnonce,
msg_time_t  now 
)

Generate nonce parameter.

Parameters:
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]
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.

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.

Parameters:
am 
base 
root 
tag,value,... tagged argument list
Related Tags:
AUTHTAG_REALM(), AUTHTAG_OPAQUE(), AUTHTAG_DB(), AUTHTAG_QOP(), AUTHTAG_ALGORITHM(), AUTHTAG_EXPIRES(), AUTHTAG_NEXT_EXPIRES(), AUTHTAG_BLACKLIST(), AUTHTAG_FORBIDDEN(), AUTHTAG_ANONYMOUS(), AUTHTAG_FAKE(), AUTHTAG_ALLOW(), AUTHTAG_REMOTE(), and AUTHTAG_MASTER_KEY().
Returns:
0 if successful
-1 upon an error
auth_passwd_t* auth_mod_addpass ( auth_mod_t am,
char const *  user,
char const *  realm 
)

Add a password entry.

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.

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_passwd_t* auth_mod_getpass ( auth_mod_t am,
char const *  user,
char const *  realm 
)

Get an passwd entry for user.

int auth_validate_digest_nonce ( auth_mod_t am,
auth_status_t as,
auth_response_t ar,
msg_time_t  now 
)

Validate nonce parameter.

Parameters:
am pointer to authentication module object
as authentication status structure [OUT]
ar decoded authentication response from client [IN]
now current time [IN]
 All Data Structures Files Functions Variables Typedefs Defines

Sofia-SIP 1.12.11 - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.