# trust_context.h

Go to the documentation of this file.

    00001
    00002 /*
    00003  * Licensed to the Apache Software Foundation (ASF) under one or more
    00004  * contributor license agreements.  See the NOTICE file distributed with
    00005  * this work for additional information regarding copyright ownership.
    00006  * The ASF licenses this file to You under the Apache License, Version 2.0
    00007  * (the "License"); you may not use this file except in compliance with
    00008  * the License.  You may obtain a copy of the License at
    00009  *
    00010  *      http://www.apache.org/licenses/LICENSE-2.0
    00011  *
    00012  * Unless required by applicable law or agreed to in writing, software
    00013  * distributed under the License is distributed on an "AS IS" BASIS,
    00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00015  * See the License for the specific language governing permissions and
    00016  * limitations under the License.
    00017  */
    00018
    00019 #ifndef TRUST_CONTEXT_H
    00020 #define TRUST_CONTEXT_H
    00021
    00027 #include <stdio.h>
    00028 #include <stdlib.h>
    00029 #include <axutil_utils.h>
    00030 #include <axutil_string.h>
    00031 #include <axutil_base64.h>
    00032 #include <axiom_soap.h>
    00033 #include <axiom.h>
    00034 #include <axis2_msg_ctx.h>
    00035 #include <axis2_addr.h>
    00036 #include <trust_constants.h>
    00037 #include <trust_rst.h>
    00038 #include <trust_rstr.h>
    00039
    00040 #ifdef __cplusplus
    00041 extern "C"
    00042 {
    00043 #endif
    00044
    00045     typedef struct trust_context trust_context_t;
    00046
    00047     AXIS2_EXTERN trust_context_t *AXIS2_CALL
    00048                 trust_context_create(
    00049             const axutil_env_t * env);
    00050
    00051     AXIS2_EXTERN  void AXIS2_CALL
    00052             trust_context_free(
    00053                         trust_context_t *trust_context,
    00054             const axutil_env_t * env);
    00055
    00056
    00057     /*Populate RST_CONTEXT : Often used in STS/IP side */
    00058         AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00059         trust_context_process_rst(
    00060                 trust_context_t *trust_context,
    00061         const axutil_env_t * env,
    00062         axis2_msg_ctx_t * in_msg_ctx);
    00063
    00064     /*Populate RSTR_CONTEXT : Often used in Token Requestor side*/
    00065     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00066         trust_context_process_rstr(
    00067                 trust_context_t *trust_context,
    00068         const axutil_env_t * env,
    00069         axis2_msg_ctx_t * in_msg_ctx);
    00070
    00071     /*Build RST Node from created RST_CONTEXT */
    00072     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00073         trust_context_build_rst_node(
    00074                 trust_context_t *trust_context,
    00075         const axutil_env_t * env);
    00076
    00077     /*Build RSTR Node from created RSTR_CONTEXT */
    00078     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
    00079         trust_context_build_rstr_node(
    00080                 trust_context_t *trust_context,
    00081         const axutil_env_t * env);
    00082
    00083
    00084     /*Get Populated RST_CONTEXT */
    00085     AXIS2_EXTERN trust_rst_t* AXIS2_CALL
    00086         trust_context_get_rst(
    00087                 trust_context_t *trust_context,
    00088         const axutil_env_t * env);
    00089
    00090     /*Get Populated RSTR_CONTEXT */
    00091     AXIS2_EXTERN trust_rstr_t* AXIS2_CALL
    00092         trust_context_get_rstr(
    00093                 trust_context_t *trust_context,
    00094         const axutil_env_t * env);
    00095
    00096     /*Set RST_CONTEXT */
    00097     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00098     trust_context_set_rst(
    00099                 trust_context_t *trust_context,
    00100         const axutil_env_t * env,
    00101         trust_rst_t *rst);
    00102
    00103     /*Set RSTR_CONTEXT */
    00104     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00105         trust_context_set_rstr(
    00106                 trust_context_t *trust_context,
    00107         const axutil_env_t * env,
    00108         trust_rstr_t *rstr);
    00109
    00110
    00111
    00112
    00113 #ifdef __cplusplus
    00114 }
    00115 #endif
    00116 #endif                          /*TRUST_CONTEXT_H */