iptsec  1.12.11devel
 All Data Structures Files Functions Variables Typedefs Enumerator Macros Groups Pages
Data Structures | Macros | Functions
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...
 

Macros

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

Functions

auth_passwd_tauth_mod_getpass (auth_mod_t *am, char const *user, char const *realm)
 Get an passwd entry for user. More...
 
auth_passwd_tauth_mod_addpass (auth_mod_t *am, char const *user, char const *realm)
 Add a password entry. More...
 
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. More...
 
auth_mod_tauth_mod_alloc (auth_scheme_t *scheme, tag_type_t, tag_value_t,...)
 Allocate an authentication module instance. More...
 
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. More...
 
void auth_cancel_default (auth_mod_t *am, auth_status_t *as)
 Default cancel method. More...
 
void auth_destroy_default (auth_mod_t *am)
 Default destroy method. More...
 
void auth_method_basic (auth_mod_t *am, auth_status_t *as, msg_auth_t *auth, auth_challenger_t const *ach)
 Basic scheme. More...
 
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. More...
 
msg_auth_t * auth_digest_credentials (msg_auth_t *auth, char const *realm, char const *opaque)
 Digest scheme. More...
 
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. More...
 
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. More...
 
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. More...
 
int auth_validate_digest_nonce (auth_mod_t *am, auth_status_t *as, auth_response_t *ar, msg_time_t now)
 Validate nonce parameter. More...
 
int auth_allow_check (auth_mod_t *am, auth_status_t *as)
 Check if request method is on always-allowed list. More...
 
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.nosp@m..Pes.nosp@m.si@no.nosp@m.kia..nosp@m.com
Date
Created: Tue Apr 27 15:22:07 2004 ppessi

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

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.

Parameters
ampointer to authentication module object
bufferstring buffer for nonce [OUT]
bsizesize of buffer [IN]
nextnoncetrue if this is a "nextnonce" [IN]
nowcurrent 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
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_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
ampointer to authentication module object
asauthentication status structure [OUT]
ardecoded authentication response from client [IN]
nowcurrent time [IN]

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