# oxs_tokens.h

Go to the documentation of this file.

    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 OXS_TOKENS_H
    00019 #define OXS_TOKENS_H
    00020
    00021 #include <axis2_util.h>
    00022 #include <stdio.h>
    00023 #include <axutil_qname.h>
    00024 #include <axis2_defines.h>
    00025 #include <axutil_env.h>
    00026 #include <axiom_node.h>
    00027 #include <axiom_element.h>
    00028 #include <axiom_attribute.h>
    00029 #include <oxs_constants.h>
    00030 #include <rampart_constants.h>
    00031 #include <oxs_utility.h>
    00032 #include <oxs_axiom.h>
    00033 #include <axutil_array_list.h>
    00034
    00039 #ifdef __cplusplus
    00040 extern "C"
    00041 {
    00042 #endif
    00043
    00052     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00053     oxs_token_build_binary_security_token_element(
    00054                 const axutil_env_t * env,
    00055                 axiom_node_t * parent,
    00056                 axis2_char_t * id,
    00057                 axis2_char_t * encoding_type,
    00058                 axis2_char_t * value_type,
    00059                 axis2_char_t * data);
    00060
    00064     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00065     oxs_token_build_c14n_method_element(
    00066                 const axutil_env_t * env,
    00067                 axiom_node_t * parent,
    00068                 axis2_char_t * algorithm);
    00069
    00073     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00074     oxs_token_get_c14n_method(
    00075                 const axutil_env_t * env,
    00076                 axiom_node_t * c14n_mtd_node);
    00077
    00081     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00082     oxs_token_build_cipher_data_element(
    00083                 const axutil_env_t * env,
    00084                 axiom_node_t * parent);
    00085
    00089     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00090     oxs_token_get_cipher_value_from_cipher_data(
    00091                 const axutil_env_t * env,
    00092                 axiom_node_t * cd_node);
    00093
    00097     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00098     oxs_token_build_cipher_value_element(
    00099                 const axutil_env_t * env,
    00100                 axiom_node_t * parent,
    00101                 axis2_char_t * cipher_val);
    00102
    00106     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00107     oxs_token_get_cipher_value(
    00108                 const axutil_env_t * env,
    00109                 axiom_node_t * cv_node);
    00110
    00114     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00115     oxs_token_build_data_reference_element(
    00116                 const axutil_env_t * env,
    00117                 axiom_node_t * parent,
    00118                 axis2_char_t * data_ref);
    00119
    00123     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00124     oxs_token_get_data_reference(
    00125                 const axutil_env_t * env,
    00126                 axiom_node_t * data_ref_node);
    00127
    00131     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00132     oxs_token_build_digest_method_element(
    00133                 const axutil_env_t * env,
    00134                 axiom_node_t * parent,
    00135                 axis2_char_t * algorithm);
    00136
    00140     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00141     oxs_token_get_digest_method(
    00142                 const axutil_env_t * env,
    00143                 axiom_node_t * enc_mtd_node);
    00144
    00148     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00149     oxs_token_build_digest_value_element(
    00150                 const axutil_env_t * env,
    00151                 axiom_node_t * parent,
    00152                 axis2_char_t * digest_val);
    00153
    00157     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00158     oxs_token_get_digest_value(
    00159                 const axutil_env_t * env,
    00160                 axiom_node_t * sv_node);
    00161
    00165     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00166     oxs_token_build_ds_reference_element(
    00167                 const axutil_env_t *env,
    00168                 axiom_node_t *parent,
    00169                 axis2_char_t *id,
    00170                 axis2_char_t *uri,
    00171                 axis2_char_t *type);
    00172
    00176     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00177     oxs_token_get_ds_reference(
    00178                 const axutil_env_t * env,
    00179                 axiom_node_t * ref_node);
    00180
    00184     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00185     oxs_token_build_embedded_element(
    00186                 const axutil_env_t * env,
    00187                 axiom_node_t * parent,
    00188                 axis2_char_t * id);
    00189
    00193     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00194     oxs_token_get_embedded_id(
    00195                 const axutil_env_t * env,
    00196                 axiom_node_t * embedded_node);
    00197
    00201     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00202     oxs_token_build_encrypted_data_element(
    00203                 const axutil_env_t * env,
    00204                 axiom_node_t * parent,
    00205                 axis2_char_t * type_attribute,
    00206                 axis2_char_t * id);
    00207
    00211     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00212     oxs_token_build_encrypted_key_element(
    00213                 const axutil_env_t * env,
    00214                 axiom_node_t * parent );
    00215
    00216     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00217     oxs_token_get_encrypted_key_node(
    00218                 const axutil_env_t * env,
    00219                 axiom_node_t * parent);
    00220
    00224     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00225     oxs_token_build_encryption_method_element(
    00226                 const axutil_env_t * env,
    00227                 axiom_node_t * parent,
    00228                 axis2_char_t * algorithm);
    00229
    00233     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00234     oxs_token_get_encryption_method(
    00235                 const axutil_env_t * env,
    00236                 axiom_node_t * enc_mtd_node);
    00237
    00241     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00242     oxs_token_build_key_identifier_element(
    00243                 const axutil_env_t * env,
    00244                 axiom_node_t * parent,
    00245                 axis2_char_t * encoding_type,
    00246                 axis2_char_t * value_type,
    00247                 axis2_char_t * value);
    00248
    00252     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00253     oxs_token_build_key_info_element(
    00254                 const axutil_env_t * env,
    00255                 axiom_node_t * parent);
    00256
    00260     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00261     oxs_token_build_key_name_element(
    00262                 const axutil_env_t * env,
    00263                 axiom_node_t * parent,
    00264                 axis2_char_t * key_name_val);
    00265
    00269     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00270     oxs_token_build_reference_element(
    00271                 const axutil_env_t * env,
    00272                 axiom_node_t * parent,
    00273                 axis2_char_t * ref,
    00274                 axis2_char_t * value_type);
    00275
    00279     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00280     oxs_token_get_reference(
    00281                 const axutil_env_t * env,
    00282                 axiom_node_t * ref_node);
    00283
    00287     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00288     oxs_token_get_reference_value_type(
    00289                 const axutil_env_t * env,
    00290         axiom_node_t * ref_node);
    00291
    00295     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00296     oxs_token_build_reference_list_element(
    00297                 const axutil_env_t * env,
    00298                 axiom_node_t * parent);
    00299
    00303     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00304     oxs_token_build_data_reference_list(
    00305                 const axutil_env_t * env,
    00306                 axiom_node_t * parent,
    00307                 axutil_array_list_t * id_list);
    00308
    00312     AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL
    00313     oxs_token_get_reference_list_data(
    00314                 const axutil_env_t * env,
    00315                 axiom_node_t * ref_list_node);
    00316
    00320     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00321     oxs_token_build_security_token_reference_element(
    00322                 const axutil_env_t * env,
    00323                 axiom_node_t * parent);
    00324
    00328     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00329     oxs_token_build_signature_element(
    00330                 const axutil_env_t * env,
    00331                 axiom_node_t * parent,
    00332                 axis2_char_t * id);
    00333
    00337     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00338     oxs_token_build_enc_header_element(
    00339                 const axutil_env_t * env,
    00340                 axiom_node_t * parent,
    00341                 axis2_char_t * id);
    00342
    00346     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00347     oxs_token_build_signature_method_element(
    00348                 const axutil_env_t * env,
    00349                 axiom_node_t * parent,
    00350                 axis2_char_t * algorithm);
    00351
    00355     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00356     oxs_token_get_signature_method(
    00357                 const axutil_env_t * env,
    00358                 axiom_node_t * enc_mtd_node);
    00359
    00363     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00364     oxs_token_build_signature_value_element(
    00365                 const axutil_env_t * env,
    00366                 axiom_node_t * parent,
    00367                 axis2_char_t * signature_val);
    00368
    00372     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00373     oxs_token_get_signature_value(
    00374                 const axutil_env_t * env,
    00375                 axiom_node_t * sv_node);
    00376
    00380     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00381     oxs_token_build_signed_info_element(
    00382                 const axutil_env_t * env,
    00383                 axiom_node_t * parent);
    00384
    00388     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00389     oxs_token_build_transform_element(
    00390                 const axutil_env_t * env,
    00391                 axiom_node_t * parent,
    00392                 axis2_char_t * algorithm);
    00393
    00397     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00398     oxs_token_get_transform(
    00399                 const axutil_env_t * env,
    00400                 axiom_node_t * transform_node);
    00401
    00405     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00406     oxs_token_build_transforms_element(
    00407                 const axutil_env_t * env,
    00408                 axiom_node_t * parent);
    00409
    00413     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00414     oxs_token_build_x509_certificate_element(
    00415                 const axutil_env_t * env,
    00416                 axiom_node_t * parent,
    00417                 axis2_char_t * cert_data);
    00418
    00422     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00423     oxs_token_get_x509_certificate(
    00424                 const axutil_env_t * env,
    00425                 axiom_node_t * sv_node);
    00426
    00430     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00431     oxs_token_build_x509_data_element(
    00432                 const axutil_env_t * env,
    00433                 axiom_node_t * parent);
    00434
    00438     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00439     oxs_token_build_issuer_name_element(
    00440                 const axutil_env_t * env,
    00441                 axiom_node_t * parent,
    00442                 axis2_char_t * value );
    00443
    00447     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00448     oxs_token_get_issuer_name(
    00449                 const axutil_env_t * env,
    00450                 axiom_node_t * issuer_name_node);
    00451
    00455     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00456     oxs_token_build_x509_issuer_serial_element(
    00457                 const axutil_env_t * env,
    00458                 axiom_node_t * parent);
    00459
    00463     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00464     oxs_token_build_x509_issuer_serial_with_data(
    00465                 const axutil_env_t * env,
    00466                 axiom_node_t * parent,
    00467                 axis2_char_t * issuer_name,
    00468                 axis2_char_t * serial_number);
    00469
    00473     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00474     oxs_token_build_serial_number_element(
    00475                 const axutil_env_t * env,
    00476                 axiom_node_t * parent,
    00477                 axis2_char_t * value );
    00478
    00482     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00483     oxs_token_get_serial_number(
    00484                 const axutil_env_t * env,
    00485                 axiom_node_t * serial_number_node);
    00486
    00490     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00491     oxs_token_build_signature_confirmation_element(
    00492                 const axutil_env_t * env,
    00493                 axiom_node_t * parent,
    00494                 axis2_char_t * id,
    00495                 axis2_char_t * val);
    00496
    00500     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00501     oxs_token_get_signature_confirmation_value(
    00502                 const axutil_env_t * env,
    00503                 axiom_node_t * signature_confirmation_node);
    00504
    00508     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
    00509     oxs_token_get_signature_confirmation_id(
    00510                 const axutil_env_t * env,
    00511                 axiom_node_t * signature_confirmation_node);
    00512
    00516     AXIS2_EXTERN axiom_node_t * AXIS2_CALL
    00517     oxs_token_build_derived_key_token_element(
    00518         const axutil_env_t * env,
    00519         axiom_node_t * parent,
    00520         axis2_char_t * id,
    00521         axis2_char_t * algo,
    00522         axis2_char_t* wsc_ns_uri);
    00523
    00527     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00528     oxs_token_build_length_element(
    00529         const axutil_env_t *env,
    00530         axiom_node_t *parent,
    00531         int length,
    00532         axis2_char_t *wsc_ns_uri);
    00533
    00537     AXIS2_EXTERN int AXIS2_CALL
    00538     oxs_token_get_length_value(
    00539         const axutil_env_t *env,
    00540         axiom_node_t *length_node);
    00541
    00545     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00546     oxs_token_build_offset_element(
    00547         const axutil_env_t *env,
    00548         axiom_node_t *parent,
    00549         int offset,
    00550         axis2_char_t *wsc_ns_uri);
    00551
    00555     AXIS2_EXTERN int AXIS2_CALL
    00556     oxs_token_get_offset_value(
    00557         const axutil_env_t *env,
    00558         axiom_node_t *offset_node);
    00559
    00563     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00564     oxs_token_build_nonce_element(
    00565         const axutil_env_t *env,
    00566         axiom_node_t *parent,
    00567         axis2_char_t *nonce_val,
    00568         axis2_char_t *wsc_ns_uri);
    00569
    00573     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
    00574     oxs_token_get_nonce_value(
    00575         const axutil_env_t *env,
    00576         axiom_node_t *nonce_node);
    00577
    00581         AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00582         oxs_token_build_label_element(
    00583         const axutil_env_t *env,
    00584                 axiom_node_t *parent,
    00585                 axis2_char_t *label,
    00586         axis2_char_t *wsc_ns_uri);
    00587
    00591     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
    00592     oxs_token_get_label_value(
    00593         const axutil_env_t *env,
    00594         axiom_node_t *label_node);
    00595
    00599     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00600     oxs_token_build_properties_element(
    00601         const axutil_env_t *env,
    00602         axiom_node_t *parent,
    00603         axis2_char_t* properties_val,
    00604         axis2_char_t *wsc_ns_uri);
    00605
    00609     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
    00610     oxs_token_get_properties_value(
    00611         const axutil_env_t *env,
    00612         axiom_node_t *properties_node);
    00613
    00617     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00618     oxs_token_build_generation_element(
    00619         const axutil_env_t *env,
    00620         axiom_node_t *parent,
    00621         axis2_char_t *generation_val,
    00622         axis2_char_t *wsc_ns_uri);
    00623
    00627     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
    00628     oxs_token_get_generation_value(
    00629         const axutil_env_t *env,
    00630         axiom_node_t *generation_node);
    00631
    00634 #ifdef __cplusplus
    00635 }
    00636 #endif
    00637
    00638 #endif /*OXS_TOKENS_H */