00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <axutil_param.h>
00018
00019 #ifndef RAMPART_AUTHN_PROVIDER_H
00020 #define RAMPART_AUTHN_PROVIDER_H
00021
00032 #include <axis2_defines.h>
00033 #include <axutil_error.h>
00034 #include <axutil_env.h>
00035 #include <axutil_utils.h>
00036 #include <axis2_msg_ctx.h>
00037
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042 enum rampart_authn_provider_status{
00043 RAMPART_AUTHN_PROVIDER_DENIED = 0,
00044 RAMPART_AUTHN_PROVIDER_GRANTED,
00045 RAMPART_AUTHN_PROVIDER_FOUND,
00046 RAMPART_AUTHN_PROVIDER_USER_FOUND,
00047 RAMPART_AUTHN_PROVIDER_USER_NOT_FOUND,
00048 RAMPART_AUTHN_PROVIDER_GENERAL_ERROR
00049 };
00050
00051 typedef enum rampart_authn_provider_status rampart_authn_provider_status_t;
00052
00061 typedef struct rampart_authn_provider_ops rampart_authn_provider_ops_t;
00062
00067 typedef struct rampart_authn_provider rampart_authn_provider_t;
00068
00071 struct rampart_authn_provider_ops
00072 {
00073
00074
00084 rampart_authn_provider_status_t (AXIS2_CALL*
00085 rampart_authn_provider_check_password)(
00086 rampart_authn_provider_t *authn_provider,
00087 const axutil_env_t* env,
00088 axis2_msg_ctx_t *msg_ctx,
00089 const axis2_char_t *username,
00090 const axis2_char_t *password
00091 );
00092
00104 rampart_authn_provider_status_t (AXIS2_CALL*
00105 rampart_authn_provider_check_password_digest)(
00106 rampart_authn_provider_t *authn_provider,
00107 const axutil_env_t* env,
00108 axis2_msg_ctx_t *msg_ctx,
00109 const axis2_char_t *username,
00110 const axis2_char_t *nonce,
00111 const axis2_char_t *created,
00112 const char *digest
00113 );
00114
00121 axis2_status_t (AXIS2_CALL*
00122 free)(rampart_authn_provider_t *authn_provider,
00123 const axutil_env_t* env);
00124
00125 };
00126
00127 struct rampart_authn_provider
00128 {
00129 rampart_authn_provider_ops_t *ops;
00130 axutil_param_t *param;
00131 };
00132
00133
00134
00135 #define RAMPART_AUTHN_PROVIDER_FREE(authn_provider, env) \
00136 ((authn_provider)->ops->free (authn_provider, env))
00137
00138 #define RAMPART_AUTHN_PROVIDER_CHECK_PASSWORD(authn_provider, env, msg_ctx, username, password) \
00139 ((authn_provider)->ops->rampart_authn_provider_check_password(authn_provider, env, msg_ctx, username, password))
00140
00141 #define RAMPART_AUTHN_PROVIDER_CHECK_PASSWORD_DIGEST(authn_provider, env, msg_ctx, username, nonce, nonce_length, digest) \
00142 ((authn_provider)->ops->rampart_authn_provider_check_password_digest(authn_provider, env, msg_ctx, username, nonce, nonce_length, digest))
00143
00145 #ifdef __cplusplus
00146 }
00147 #endif
00148
00149 #endif
00150