# rampart_saml.h

Go to the documentation of this file.

    00001 /*
    00002  *   Copyright 2003-2004 The Apache Software Foundation.
    00003  *
    00004  *   Licensed under the Apache License, Version 2.0 (the "License");
    00005  *   you may not use this file except in compliance with the License.
    00006  *   You may obtain a copy of the License at
    00007  *
    00008  *       http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  *   Unless required by applicable law or agreed to in writing, software
    00011  *   distributed under the License is distributed on an "AS IS" BASIS,
    00012  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  *   See the License for the specific language governing permissions and
    00014  *   limitations under the License.
    00015  */
    00016
    00017 #include <axutil_utils_defines.h>
    00018 #include <axis2_defines.h>
    00019 #include <axutil_env.h>
    00020 #include <axiom_soap.h>
    00021 #include <axis2_msg_ctx.h>
    00022 #include <oxs_asym_ctx.h>
    00023 #include <oxs_xml_encryption.h>
    00024 #include <rampart_context.h>
    00025 #include <axutil_utils.h>
    00026 #include <axiom.h>
    00027 #include <rampart_saml_token.h>
    00028 #include <oxs_key_mgr.h>
    00029 #include <rp_rampart_config.h>
    00030
    00037 #ifndef RAMPART_SAML_H
    00038 #define RAMPART_SAML_H
    00039
    00040 #ifdef __cplusplus
    00041 extern "C" {
    00042 #endif
    00043
    00044 #define RAMPART_ST_FAULT_SECURITYTOKENUNAVAILABLE_STR   "A referenced SAML assertion could not be retrieved."
    00045 #define RAMPART_ST_FAULT_UNSUPPORTEDSECURITYTOKEN_STR   "An assertion contains a <saml:condition> element that the receive does not understand."
    00046 #define RAMPART_ST_FAULT_FAILEDCHECK_STR                "A signature withing an assertion or referencing an assertion is invalid."
    00047 #define RAMPART_ST_FAULT_INVALIDSECURITYTOKEN_STR       "The issuer of an assertion is not acceptable to the receiver."
    00048
    00049 #define RAMPART_ST_FAULT_SECURITYTOKENUNAVAILABLE_CODE  "wsse:SecurityTokenUnavailable"
    00050 #define RAMPART_ST_FAULT_UNSUPPORTEDSECURITYTOKEN_CODE  "wsse:UnsupportedSecurityToken"
    00051 #define RAMPART_ST_FAULT_FAILEDCHECK_CODE               "wsse:FailedCheck"
    00052 #define RAMPART_ST_FAULT_INVALIDSECURITYTOKEN_CODE      "wsse:InvalidSecurityToken"
    00053
    00054 #define RAMPART_SAML_FAULT_CODE                         "env:Sender"
    00055
    00065 AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00066 rampart_saml_supporting_token_build(const axutil_env_t *env,
    00067                          rampart_context_t *rampart_context,
    00068                          axiom_node_t *sec_node,
    00069                          axutil_array_list_t *sign_parts);
    00079 AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00080 rampart_saml_token_validate(const axutil_env_t *env,
    00081                             rampart_context_t *rampart_context,
    00082                             axiom_node_t *assertion);
    00090 AXIS2_EXTERN char * AXIS2_CALL
    00091 rampart_saml_token_get_subject_confirmation(const axutil_env_t *env,
    00092                                             axiom_node_t *assertion);
    00093
    00094
    00102 AXIS2_EXTERN int AXIS2_CALL
    00103 rampart_saml_token_fault_securitytokenunavailable(axutil_env_t *env,
    00104                                                   axis2_msg_ctx_t *ctx);
    00112 AXIS2_EXTERN int AXIS2_CALL
    00113 rampart_saml_token_fault_unsupportedsecuritytoken(axutil_env_t *env,
    00114                                                   axis2_msg_ctx_t *ctx);
    00122 AXIS2_EXTERN int AXIS2_CALL
    00123 rampart_saml_token_fault_failedcheck(axutil_env_t *env,
    00124                                                   axis2_msg_ctx_t *ctx);
    00132 AXIS2_EXTERN int AXIS2_CALL
    00133 rampart_saml_token_fault_invalidsecuritytoken(axutil_env_t *env,
    00134                                                   axis2_msg_ctx_t *ctx);
    00135
    00136
    00137 AXIS2_EXTERN rampart_saml_token_t * AXIS2_CALL
    00138 rampart_saml_add_token(rampart_context_t *rampart_context,
    00139                                            const axutil_env_t *env, axiom_node_t *assertion,
    00140                                            axiom_node_t *str,
    00141                                            rampart_st_type_t type);
    00142 #ifdef __cplusplus
    00143 }
    00144 #endif
    00145
    00146 #endif