00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef RAMPART_SCT_PROVIDER_H
00019 #define RAMPART_SCT_PROVIDER_H
00020
00032 #include <axis2_defines.h>
00033 #include <axutil_env.h>
00034 #include <axis2_msg_ctx.h>
00035 #include <axis2_conf_ctx.h>
00036 #include <rampart_context.h>
00037 #include <secconv_security_context_token.h>
00038 #include <axutil_hash.h>
00039
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044
00048 typedef struct rampart_sct_provider_ops rampart_sct_provider_ops_t;
00049
00054 typedef struct rampart_sct_provider rampart_sct_provider_t;
00055
00059 struct rampart_sct_provider_ops
00060 {
00061 security_context_token_t* (AXIS2_CALL*
00062 get_token)(rampart_sct_provider_t *sct_provider,
00063 const axutil_env_t* env,
00064 rp_property_t *token,
00065 axis2_bool_t server_side,
00066 axis2_bool_t is_encryption,
00067 axis2_char_t* identifier,
00068 rampart_context_t* rampart_context,
00069 axis2_msg_ctx_t* msg_ctx);
00070
00071 axis2_status_t (AXIS2_CALL*
00072 free)(rampart_sct_provider_t *sct_provider,
00073 const axutil_env_t* env);
00074 };
00075
00076 struct rampart_sct_provider
00077 {
00078 rampart_sct_provider_ops_t *ops;
00079 axutil_param_t *param;
00080 };
00081
00082
00083 AXIS2_EXTERN oxs_buffer_t *AXIS2_CALL
00084 sct_provider_get_secret(
00085 const axutil_env_t* env,
00086 rp_property_t *token,
00087 axis2_bool_t server_side,
00088 axis2_bool_t is_encryption,
00089 rampart_context_t* rampart_context,
00090 axis2_msg_ctx_t* msg_ctx);
00091
00092
00093 AXIS2_EXTERN oxs_buffer_t *AXIS2_CALL
00094 sct_provider_get_secret_using_id(
00095 const axutil_env_t* env,
00096 axis2_char_t* sct_id,
00097 rampart_context_t* rampart_context,
00098 axis2_msg_ctx_t* msg_ctx);
00099
00100 AXIS2_EXTERN axiom_node_t *AXIS2_CALL
00101 sct_provider_get_token(
00102 const axutil_env_t* env,
00103 rp_property_t *token,
00104 axis2_bool_t server_side,
00105 axis2_bool_t is_encryption,
00106 rampart_context_t* rampart_context,
00107 axis2_msg_ctx_t* msg_ctx);
00108
00109 AXIS2_EXTERN axiom_node_t* AXIS2_CALL
00110 sct_provider_get_attached_reference(
00111 const axutil_env_t* env,
00112 rp_property_t *token,
00113 axis2_bool_t server_side,
00114 axis2_bool_t is_encryption,
00115 rampart_context_t* rampart_context,
00116 axis2_msg_ctx_t* msg_ctx);
00117
00118 AXIS2_EXTERN axiom_node_t* AXIS2_CALL
00119 sct_provider_get_unattached_reference(
00120 const axutil_env_t* env,
00121 rp_property_t *token,
00122 axis2_bool_t server_side,
00123 axis2_bool_t is_encryption,
00124 rampart_context_t* rampart_context,
00125 axis2_msg_ctx_t* msg_ctx);
00126
00127 AXIS2_EXTERN axutil_hash_t* AXIS2_CALL
00128 sct_provider_get_sct_hash(
00129 const axutil_env_t *env,
00130 axis2_msg_ctx_t* msg_ctx);
00131
00132
00133 #define RAMPART_SCT_PROVIDER_GET_TOKEN(sct_provider, env, token, server_side, is_enc, sct_id, rampart_ctx, msg_ctx) \
00134 ((sct_provider)->ops->get_token(sct_provider, env, token, server_side, is_enc, sct_id, rampart_ctx, msg_ctx))
00135
00136 #define RAMPART_SCT_PROVIDER_FREE(sct_provider, env) \
00137 ((sct_provider)->ops->free(sct_provider, env))
00138
00140 #ifdef __cplusplus
00141 }
00142 #endif
00143
00144 #endif
00145
00146