rampart_username_token.h

00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
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 /*************************** Function macros **********************************/
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 /*USERNAME_TOKEN_H*/

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1