rampart_saml_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 RAMPART_SAML_TOKEN_H
00019 #define RAMPART_SAML_TOKEN_H
00020 
00021 #include <rampart_saml_token.h>
00022 #include <oxs_saml_token.h>
00023 #include <axutil_utils.h>
00024 #include <axiom.h>
00025 #include <axis2_msg_ctx.h>
00026 #include <oxs_key.h>
00027 #include <rp_property.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033     
00034 /*
00035  * Rampart saml token subject confirmation types. Rampart support both holder 
00036  * of key and sender vouches methods of subject confiramtions.
00037  */
00038 typedef enum 
00039 {
00040     RAMPART_ST_CONFIR_TYPE_UNSPECIFIED = 0,
00041     RAMPART_ST_CONFIR_TYPE_SENDER_VOUCHES,
00042     RAMPART_ST_CONFIR_TYPE_HOLDER_OF_KEY
00043 } rampart_st_confir_type_t;
00044 
00045 typedef enum
00046 {
00047     RAMPART_ST_TYPE_UNSPECIFIED = 0,
00048     RAMPART_ST_TYPE_SIGNED_SUPPORTING_TOKEN,
00049     RAMPART_ST_TYPE_SIGNATURE_TOKEN,
00050     RAMPART_ST_TYPE_ENCRYPTION_TOKEN,
00051     RAMPART_ST_TYPE_PROTECTION_TOKEN
00052 } rampart_st_type_t;
00053 
00054 typedef struct rampart_saml_token_t rampart_saml_token_t;
00055 
00064 AXIS2_EXTERN rampart_saml_token_t *AXIS2_CALL
00065 rampart_saml_token_create(const axutil_env_t *env, axiom_node_t *assertion, 
00066                           rampart_st_confir_type_t type);
00074 AXIS2_EXTERN int AXIS2_CALL
00075 rampart_saml_token_free(rampart_saml_token_t *tok, const axutil_env_t *env);
00084 AXIS2_EXTERN int AXIS2_CALL
00085 rampart_saml_token_set_assertion(rampart_saml_token_t *tok, const axutil_env_t *env, 
00086                                  axiom_node_t *assertion);
00094 AXIS2_EXTERN axiom_node_t* AXIS2_CALL
00095 rampart_saml_token_get_assertion(rampart_saml_token_t *tok, const axutil_env_t *env);
00104 AXIS2_EXTERN int AXIS2_CALL
00105 rampart_saml_token_set_type(rampart_saml_token_t *tok, const axutil_env_t *env, 
00106                             rampart_st_confir_type_t type);
00114 AXIS2_EXTERN rampart_st_confir_type_t AXIS2_CALL
00115 rampart_saml_token_get_type(rampart_saml_token_t *tok, const axutil_env_t *env);
00124 AXIS2_EXTERN int AXIS2_CALL
00125 rampart_saml_token_set_key_value(rampart_saml_token_t *tok, const axutil_env_t *env, 
00126                                  oxs_key_t *key);
00134 AXIS2_EXTERN axiom_node_t * AXIS2_CALL
00135 rampart_saml_token_get_str(rampart_saml_token_t *tok, const axutil_env_t *env);
00144 AXIS2_EXTERN int AXIS2_CALL
00145 rampart_saml_token_set_str(rampart_saml_token_t *tok, const axutil_env_t *env, 
00146                            axiom_node_t *str);
00156 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00157 rampart_saml_token_set_is_added_to_header(rampart_saml_token_t *tok, 
00158                                       const axutil_env_t *env,
00159                                       axis2_bool_t is_token_added);
00167 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
00168 rampart_saml_token_is_added_to_header(rampart_saml_token_t *tok, 
00169                                       const axutil_env_t *env);
00179 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00180 rampart_saml_token_set_token_type(rampart_saml_token_t *tok,
00181                                                                   const axutil_env_t *env,
00182                                                                   rampart_st_type_t token_type);
00190 AXIS2_EXTERN rampart_st_type_t AXIS2_CALL
00191 rampart_saml_token_get_token_type(rampart_saml_token_t *tok,
00192                                                                   const axutil_env_t *env);
00193 
00194 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00195 rampart_saml_token_set_session_key(rampart_saml_token_t *tok, 
00196                                                                    const axutil_env_t *env,
00197                                                                    oxs_key_t *key);
00198 
00199 
00200 AXIS2_EXTERN oxs_key_t * AXIS2_CALL
00201 rampart_saml_token_get_session_key(rampart_saml_token_t *tok, 
00202                                                                    const axutil_env_t *env);
00203 #ifdef __cplusplus
00204 }
00205 #endif
00206 
00207 
00208 #endif 
00209 
00210 

Generated on Wed Oct 14 01:02:16 2009 for Rampart/C by  doxygen 1.5.7.1