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 RAMPART_USERNAME_TOKEN_H 00019 #define RAMPART_USERNAME_TOKEN_H 00020 00031 #ifdef __cplusplus 00032 extern "C" 00033 { 00034 #endif 00035 00036 00037 #include <axutil_env.h> 00038 #include <rampart_context.h> 00039 00040 /* 00041 * builds username token 00042 * @param env pointer to environment struct 00043 * @param rampart_context pointer to rampart context structure 00044 * @param sec_node Security header node 00045 * @param sec_ns_obj security namespace object 00046 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 00047 */ 00048 axis2_status_t AXIS2_CALL 00049 rampart_username_token_build( 00050 const axutil_env_t *env, 00051 rampart_context_t *rampart_context, 00052 axiom_node_t *sec_node, 00053 axiom_namespace_t *sec_ns_obj); 00054 00055 /* 00056 * Validates the given username token 00057 * @param env pointer to environment struct 00058 * @param msg_ctx axis2 message context 00059 * @param ut_node User name token node 00060 * @param rampart_context pointer to rampart context structure 00061 * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE 00062 */ 00063 axis2_status_t AXIS2_CALL 00064 rampart_username_token_validate( 00065 const axutil_env_t *env, 00066 axis2_msg_ctx_t *msg_ctx, 00067 axiom_node_t *ut_node, 00068 rampart_context_t *rampart_context); 00069 00070 #ifdef __cplusplus 00071 } 00072 #endif 00073 00074 00075 #endif /*RAMPART_USERNAME_TOKEN_H*/