00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef USERNAME_TOKEN_H
00019 #define USERNAME_TOKEN_H
00020
00021
00022 #ifdef __cplusplus
00023 extern "C"
00024 {
00025 #endif
00026
00027
00028 #include <axis2_env.h>
00029 #include <rampart_constants.h>
00030 #include <rampart_crypto_util.h>
00031 #include <rampart_action.h>
00032
00034 typedef struct rampart_username_token_ops rampart_username_token_ops_t;
00036 typedef struct rampart_username_token rampart_username_token_t;
00041 struct rampart_username_token_ops
00042 {
00043 axis2_status_t (AXIS2_CALL *
00044 free)(rampart_username_token_t *username_token,
00045 const axis2_env_t *env);
00056 axis2_status_t (AXIS2_CALL *
00057 build)(rampart_username_token_t *username_token,
00058 const axis2_env_t *env,
00059 axis2_ctx_t *ctx,
00060 rampart_actions_t *actions,
00061 axiom_node_t *sec_node,
00062 axiom_namespace_t *sec_ns_obj
00063 );
00072 axis2_status_t (AXIS2_CALL *
00073 validate)(rampart_username_token_t *username_token,
00074 const axis2_env_t *env,
00075 axis2_msg_ctx_t *msg_ctx,
00076 axiom_soap_header_t *soap_header,
00077 rampart_actions_t *actions
00078 );
00079 };
00080
00084 struct rampart_username_token
00085 {
00087 rampart_username_token_ops_t *ops;
00088 };
00089
00095 AXIS2_EXTERN rampart_username_token_t *AXIS2_CALL
00096 rampart_username_token_create (
00097 const axis2_env_t *env);
00098
00099
00100 #define RAMPART_USERNAME_TOKEN_FREE(username_token, env) \
00101 ((username_token)->ops->free(username_token, env))
00102
00103 #define RAMPART_USERNAME_TOKEN_BUILD(username_token, env, ctx, actions, sec_node, sec_ns_obj) \
00104 ((username_token)->ops->build(username_token, env, ctx, actions, sec_node, sec_ns_obj))
00105
00106 #define RAMPART_USERNAME_TOKEN_VALIDATE(username_token, env, msg_ctx, soap_header, actions) \
00107 ((username_token)->ops->validate(username_token, env, msg_ctx, soap_header, actions))
00108
00110 #ifdef __cplusplus
00111 }
00112 #endif
00113
00114
00115 #endif