saml.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 #ifndef SAML_H
00018 #define SAML_H
00019 
00020 #include <axutil_utils.h>
00021 #include <axutil_array_list.h>
00022 #include <axutil_hash.h>
00023 #include <axutil_date_time.h>
00024 #include <axiom.h>
00025 #include <oxs_xml_signature.h>
00026 #include <oxs_sign_ctx.h>
00027 #include <oxs_xml_key_processor.h>
00028 #include <oxs_utility.h>
00029 #include <oxs_transforms_factory.h>
00030 #include <oxs_xml_key_info_builder.h>
00031 #include <oxs_key_mgr.h>
00032 #include <oxs_transform.h>
00033 #include <oxs_x509_cert.h>
00034 #include <openssl_pkey.h>
00035 
00036 #ifdef __cplusplus
00037 extern "C"
00038 {
00039 #endif
00040 
00041 
00042 #define SAML_VERSION_MAX    16
00043 #define SAML_URI_LEN_MAX    2048
00044 #define SAML_ARRAY_LIST_DEF    4
00045 
00046 #define SAML_PREFIX                                                     "saml"
00047 #define SAML_NMSP_URI                                           "urn:oasis:names:tc:SAML:1.0:assertion"
00048 #define SAML_XML_TYPE                                           "type"
00049 #define SAML_XSI_NS                                                     "http://www.w3.org/2001/XMLSchema-instance"
00050 #define SAML_XSI                                                        "xsi"
00051 
00052 #define SAML_MAJORVERSION                                       "MajorVersion"
00053 #define SAML_MINORVERSION                                       "MinorVersion"
00054 #define SAML_ASSERTION_ID                                       "AssertionID"
00055 #define SAML_ISSUER                                                     "Issuer"
00056 #define SAML_ISSUE_INSTANT                                      "IssueInstant"
00057 #define SAML_STATEMENT                                          "Statement"
00058 #define SAML_SUBJECT_STATEMENT                          "SubjectStatement"
00059 #define SAML_AUTHENTICATION_STATEMENT           "AuthenticationStatement"
00060 #define SAML_AUTHORIZATION_DECISION_STATEMENT "AuthorizationDecisionStatement"
00061 #define SAML_ATTRIBUTE_STATEMENT                        "AttributeStatement"
00062 #define SAML_CONDITIONS                                         "Conditions"
00063 #define SAML_ADVICE                                                     "Advice"
00064 #define SAML_NOT_BEFORE                                         "NotBefore"
00065 #define SAML_NOT_ON_OR_AFTER                "NotOnOrAfter"
00066 #define SAML_SIGNATURE                                          "Signature"
00067 
00068 #define SAML_EMAIL_ADDRESS                                      "#emailAddress"
00069 #define SAML_X509_SUBJECT_NAME                          "#X509SubjectName"
00070 #define SAML_WINDOWS_DOMAIN_QUALIFIED_NAME  "#WindowsDomainQualifiedName"
00071 
00072 #define SAML_NAME_QUALIFIER                                     "NameQualifier"
00073 #define SAML_FORMAT                                                     "Format"
00074 #define SAML_NAME_IDENTIFIER                "NameIdentifier"
00075 #define SAML_SUBJECT_CONFIRMATION                       "SubjectConfirmation"
00076 #define SAML_CONFIRMATION_METHOD            "ConfirmationMethod"
00077 #define SAML_SUBJECT_CONFIRMATION_DATA          "SubjectConfirmationData"
00078 #define SAML_KEY_INFO                                           "KeyInfo"
00079 #define SAML_SUBJECT                                            "Subject"
00080 
00081 #define SAML_AUDIENCE                                           "Audience"
00082 #define SAML_AUDIENCE_RESTRICTION_CONDITION_TYPE "AudienceRestrictionConditionType" 
00083 #define SAML_AUDIENCE_RESTRICTION_CONDITION "AudienceRestrictionCondition"
00084 
00085 #define SAML_AUTHENTICATION_METHOD                      "AuthenticationMethod"
00086 #define SAML_AUTHENTICATION_INSTANT                     "AuthenticationInstant"
00087 #define SAML_IP_ADDRESS                                         "IPAddress" 
00088 #define SAML_DNS_ADDRESS                    "DNSAddress"
00089 #define SAML_SUBJECT_LOCALITY                "SubjectLocality"
00090 #define SAML_AUTHORITY_BINDING                          "AuthorityBinding"
00091 #define SAML_AUTHORITY_KIND                                     "AuthorityKind"
00092 #define SAML_LOCATION                                           "Location"
00093 #define SAML_BINDING                                            "Binding"
00094 
00095 #define SAML_RESOURCE                                           "Resource"
00096 #define SAML_DECISION                                           "Decision"    
00097 #define SAML_ACTION                                                     "Action"
00098 #define SAML_NAMESPACE                                          "Namespace"
00099 #define SAML_ASSERTION_ID_REFERENCE                     "AssertionIDReference" 
00100 #define SAML_ASSERTION                                          "Assertion"    
00101 #define SAML_ACTION                                                     "Action"
00102 #define SAML_EVIDENCE                                           "Evidence"
00103 
00104 #define SAML_ATTRIBUTE_NAME                                     "AttributeName"
00105 #define SAML_ATTRIBUTE_NAMESPACE            "AttributeNamespace"
00106 #define SAML_ATTRIBUTE_VALUE                "AttributeValue"
00107 #define SAML_ATTRIBUTE                                          "Attribute"
00108 #define SAML_ATTRIBUTE_DESIGNATOR                       "AttributeDesignator"
00109 
00110 #define SAML_SUB_CONFIRMATION_HOLDER_OF_KEY     "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key"
00111 #define SAML_SUB_CONFIRMATION_SENDER_VOUCHES    "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches"
00112 #define SAML_SUB_CONFIRMATION_ARTIFACT          "urn:oasis:names:tc:SAML:1.0:cm:artifact-01"
00113 #define SAML_SUB_CONFIRMATION_BEARER            "urn:oasis:names:tc:SAML:1.0:cm:bearer"
00114 
00115 #define SAML_AUTH_METHOD_URI_PASSWORD           "urn:oasis:names:tc:SAML:1.0:am:password"
00116 #define SAML_AUTH_METHOD_URI_KERBEROS           "urn:ietf:rfc:1510"
00117 #define SAML_AUTH_METHOD_URI_SRP                        "urn:ietf:rfc:2945"
00118 #define SAML_AUTH_METHOD_URI_HARDWARE_TOKEN     "urn:oasis:names:tc:SAML:1.0:am:HardwareToken"
00119 #define SAML_AUTH_METHOD_URI_SSL_TLS            "urn:ietf:rfc:2246"
00120 #define SAML_AUTH_METHOD_URI_X509                       "urn:oasis:names:tc:SAML:1.0:am:X509-PKI"
00121 #define SAML_AUTH_METHOD_URI_PGP                        "urn:oasis:names:tc:SAML:1.0:am:PGP"
00122 #define SAML_AUTH_METHOD_URI_SPKI                       "urn:oasis:names:tc:SAML:1.0:am:SPKI"
00123 #define SAML_AUTH_METHOD_URI_XKMS                       "urn:oasis:names:tc:SAML:1.0:am:XKMS"
00124 #define SAML_AUTH_METHOD_URI_XML_DS                     "urn:ietf:rfc:3075"
00125 #define SAML_AUTH_METHOD_URI_UNSPECIFIED        "urn:oasis:names:tc:SAML:1.0:am:unspecified"
00126 
00127 #define SAML_ACTION_URI_RWEDC_N                         "urn:oasis:names:tc:SAML:1.0:action:rwedc-negation"
00128 #define SAML_ACTION_URI_RWEDC                           "urn:oasis:names:tc:SAML:1.0:action:rwedc"
00129 
00130 #define SAML_ACTION_READ                                        "Read"
00131 #define SAML_ACTION_WRITE                                       "Write"
00132 #define SAML_ACTION_EXECUTE                                     "Execute"
00133 #define SAML_ACTION_DELETE                                      "Delete"
00134 #define SAML_ACTION_CONTROL                                     "Control"
00135 #define SAML_ACTION_READ_N                                      "~Read"
00136 #define SAML_ACTION_WRITE_N                                     "~Write"
00137 #define SAML_ACTION_EXECUTE_N                           "~Execute"
00138 #define SAML_ACTION_DELETE_N                            "~Delete"
00139 #define SAML_ACTION_CONTROL_N                           "~Control"
00140 
00141 #define SAML_MAJOR_VERSION                                      "1"
00142 
00143 typedef struct saml_assertion_s saml_assertion_t;
00144 
00145 #ifndef SAML_DECLARE
00146 #define SAML_DECLARE(type)      AXIS2_EXTERN type AXIS2_CALL
00147 #endif
00148 
00149 /* Defines the possible values to be reported as the status of an
00150  * authorization decision statement.
00151  */
00152 typedef enum decision_type
00153 {
00154     PERMIT = 0,
00155     DENY,
00156     INDETERMINATE
00157 } decision_type_t;
00158 
00159 typedef enum
00160 {
00161     SAML_COND_UNSPECFIED = 0,
00162     SAML_COND_AUDI_RESTRICTION 
00163 } saml_cond_type_t; 
00164 
00165 typedef struct condition_s 
00166 {
00167     saml_cond_type_t type;
00168     void *cond;
00169 } saml_condition_t;
00170 
00171 typedef struct saml_audi_restriction_cond_s
00172 {
00173     axutil_array_list_t *audiences;     
00174 } saml_audi_restriction_cond_t;
00175 
00176 typedef struct saml_advise_s
00177 {
00178     int a;
00179 } saml_advise_t;
00180 
00181 typedef enum
00182 {
00183     SAML_STMT_UNSPECIFED = 0,
00184     SAML_STMT_SUBJECTSTATEMENT,
00185     SAML_STMT_AUTHENTICATIONSTATEMENT,
00186     SAML_STMT_AUTHORIZATIONDECISIONSTATEMENT,
00187     SAML_STMT_ATTRIBUTESTATEMENT
00188 } saml_stmt_type_t;
00189 
00190 typedef struct
00191 {
00192     saml_stmt_type_t type;
00193     void *stmt;
00194 } saml_stmt_t;
00195 
00196 typedef struct saml_named_id_s
00197 {
00198     /* The security or administrative domain that qualifies the name of 
00199      * the subject 
00200      */
00201     axis2_char_t *name_qualifier;
00202 
00203     /* The syntax used to describe the name of the subject */
00204     axis2_char_t *format;
00205 
00206     axis2_char_t *name;
00207 } saml_named_id_t;
00208 
00209 
00210 typedef struct saml_subject_s
00211 {
00212     saml_named_id_t *named_id;
00213     
00214     /* URI reference that identifies a protocol to be used to authenticate 
00215      * the subject 
00216      */
00217     axutil_array_list_t *confirmation_methods;
00218 
00219     /* An XML Signature element that specifies a cryptographic key held by 
00220      * the subject 
00221      */
00222     axiom_node_t *key_info;
00223 
00224     /* Additional authentication information to be used by a specific 
00225      * authentication protocol 
00226      */
00227     axiom_node_t *confirmation_data;    
00228 } saml_subject_t;
00229 
00230 typedef struct saml_subject_stmt_s
00231 {
00232     saml_subject_t *subject;
00233 } saml_subject_stmt_t;
00234 
00235 typedef struct saml_action
00236 {
00237     /* URI for the specified action to be performed */
00238     char *name_space;
00239 
00240     /* An action to be performed on the data */
00241     char *data;
00242 } saml_action_t;
00243 
00244 
00245 typedef struct saml_evidence_s
00246 {
00247     /* Specifies an assertion by reference to the value of the assertion’s 
00248      * AssertionID attribute 
00249      */
00250     axutil_array_list_t *assertion_ids;
00251 
00252     /* Specifies an assertion by value */
00253     axutil_array_list_t *assertions;
00254 } saml_evidence_t;
00255 
00256 
00257 typedef struct saml_subject_locality
00258 {
00259     /* The IP address of the system entity that was authenticated */
00260     axis2_char_t *ip;
00261 
00262     /* The DNS address of the system entity that was authenticated */
00263     axis2_char_t *dns;
00264 } saml_subject_locality_t;
00265 
00266 
00267 typedef struct saml_auth_binding
00268 {
00269     /* The type of SAML Protocol queries to which the authority described 
00270      * by this element will respond 
00271      */
00272     axis2_char_t *auth_kind;
00273 
00274     /* A URI reference describing how to locate and communicate with the 
00275      * authority 
00276      */
00277     axis2_char_t *location;
00278 
00279     /* A URI reference identifying the SAML protocol binding to use 
00280      * in communicating with the authority 
00281      */
00282     axis2_char_t *binding;
00283 } saml_auth_binding_t;
00284 
00285 typedef struct saml_auth_stmt
00286 {
00287         saml_subject_t *subject;
00288 
00289     /* A URI reference that specifies the type of authentication that took place */
00290     axis2_char_t *auth_method;
00291     
00292     /* Specifies the time at which the authentication took place */
00293     axutil_date_time_t *auth_instanse;
00294 
00295     /* 
00296      * Specifies the DNS domain name and IP address for the system entity from which the Subject was
00297      * apparently authenticated 
00298      */
00299     /*saml_subject_locality_t *sub_locality;*/
00300         axis2_char_t *ip;
00301         
00302         axis2_char_t *dns;
00303 
00304     /* Indicates that additional information about the subject of the statement may be available */
00305     axutil_array_list_t *auth_binding;
00306 
00307 } saml_auth_stmt_t;
00308 
00309 typedef struct saml_auth_desicion_stmt
00310 {
00311     saml_subject_t *subject;
00312     /* A URI reference identifying the resource to which access authorization */
00313     char *resource;
00314 
00315     /* The decision rendered by the issuer with respect to the specified resource */
00316     char *decision;
00317 
00318     /* The set of actions authorized to be performed on the specified resource */
00319     axutil_array_list_t *action;
00320 
00321     /* A set of assertions that the issuer relied on in making the decision */
00322     saml_evidence_t *evidence;
00323 } saml_auth_desicion_stmt_t;
00324 
00325 typedef struct saml_attr_s 
00326 {
00327     /* The name of the attribute */
00328     char *attr_name;
00329 
00330     /* The namespace in which the AttributeName elements are interpreted */
00331     char *attr_nmsp;
00332 
00333     axutil_array_list_t *attr_value;
00334 } saml_attr_t;
00335 
00336 
00337 typedef struct saml_attr_stmt_s 
00338 {
00339     saml_subject_t *subject;
00340     /* An attribute */
00341     axutil_array_list_t *attribute;
00342 } saml_attr_stmt_t;
00343 
00344 typedef struct saml_attr_desig_s
00345 {
00346     axis2_char_t *attr_name;
00347     axis2_char_t *attr_nmsp;
00348 } saml_attr_desig_t;
00349 
00350 struct saml_assertion_s
00351 {
00352     /* majod version */
00353     axis2_char_t *major_version;
00354 
00355     /* minor version */
00356     axis2_char_t *minor_version;
00357 
00358     /* id */
00359     axis2_char_t *assertion_id;
00360 
00361     /* uri representing the issuer */
00362     axis2_char_t *issuer;
00363 
00364     /* time instant of the issue */
00365     axutil_date_time_t *issue_instant;
00366         
00367         /* specifies the time instant at which the validity interval begins */
00368     axutil_date_time_t *not_before;    
00369 
00370         /* specifies the time instant at which the validity interval has ended */
00371     axutil_date_time_t *not_on_or_after;
00372 
00373     /* SAML condition */
00374     axutil_array_list_t *conditions;
00375 
00376     /* An XML Signature that authenticates the assertion */
00377     axiom_node_t *signature;
00378 
00379         /* array list containing the statements */
00380         axutil_array_list_t *statements;
00381 
00382         /* information about the signing */
00383         oxs_sign_ctx_t *sign_ctx;
00384 
00385         /* The xml node which is used to build the assertion */
00386         axiom_node_t *ori_xml;  
00387 };
00388 
00389 /* assertion */
00390 
00391 /* 
00392  * Creates a saml assertion.
00393  * @param env pointer to environment struct
00394  */
00395 AXIS2_EXTERN saml_assertion_t *AXIS2_CALL 
00396 saml_assertion_create(
00397         const axutil_env_t *env);
00398 
00399 /* 
00400  * Free a saml assertion
00401  * @param env pointer to environment struct
00402  */
00403 AXIS2_EXTERN void AXIS2_CALL 
00404 saml_assertion_free(
00405         saml_assertion_t *assertion, 
00406         const axutil_env_t *env);
00407 
00408 /* 
00409  * Build the saml assertion from a axiom node.
00410  * @param assertion assertion to be populated
00411  * @param env pointer to environment struct
00412  */
00413 AXIS2_EXTERN int AXIS2_CALL 
00414 saml_assertion_build(
00415         saml_assertion_t *a, 
00416         axiom_node_t *node, 
00417         const axutil_env_t *env);
00418 
00419 /* 
00420  * Serialize a saml assertion to a om node.
00421  * @param assertion assertion to be serialized
00422  * @param parent if specified created node will be a child of this  
00423  * @param env pointer to environment struct
00424  */
00425 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
00426 saml_assertion_to_om(
00427         saml_assertion_t *assertion, 
00428         axiom_node_t *parent, 
00429         const axutil_env_t *env);
00430 
00431 /* 
00432  * Returns all the condition in the assertion.
00433  * @param assertion assertion object
00434  * @param env pointer to environment struct
00435  */
00436 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
00437 saml_assetion_get_conditions(
00438         saml_assertion_t *assertion, 
00439         const axutil_env_t *env);
00440 
00441 /* 
00442  * Returns all the statements in the assertion.
00443  * @param assertion SAML assertion object
00444  * @param env pointer to environment struct
00445  */
00446 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
00447 saml_assertion_get_statements(
00448         saml_assertion_t *assertion, 
00449         const axutil_env_t *env);
00450 
00451 /* 
00452  * Set the conditions for the assertion. If there are conditions already 
00453  * specified, they will be freed. 
00454  * @param assertion SAML assertion object
00455  * @param env pointer to environment struct
00456  * @param list array list containing the conditions
00457  */
00458 AXIS2_EXTERN int AXIS2_CALL 
00459 saml_assertion_set_conditions(
00460         saml_assertion_t *assertion, 
00461         const axutil_env_t *env, axutil_array_list_t *list);
00462 
00463 /* 
00464  * Add a condition to the assertin.
00465  * @param assertion SAML assertion object
00466  * @param env pointer to environment struct
00467  * @param cond a pointer to a condition to be added
00468  */
00469 AXIS2_EXTERN int AXIS2_CALL 
00470 saml_assertion_add_condition(
00471         saml_assertion_t *assertion, 
00472         const axutil_env_t *env, 
00473         saml_condition_t *cond);
00474 
00475 /*
00476  * Remove a condition from the assertion.
00477  * @param assertion SAML assertion object
00478  * @param env pointer to environment struct
00479  */
00480 AXIS2_EXTERN int AXIS2_CALL 
00481 saml_assertion_remove_condition(
00482         saml_assertion_t *assertion, 
00483         const axutil_env_t *env, 
00484         int index);
00485 
00486 /* 
00487  * Set the statements for the assertion. If there are statements already 
00488  * specified, they will be freed. 
00489  * @param assertion SAML assertion object
00490  * @param env pointer to environment struct
00491  * @param list array list containing the statements
00492  */
00493 AXIS2_EXTERN int AXIS2_CALL 
00494 saml_assertion_set_statements(
00495         saml_assertion_t *assertion, 
00496         const axutil_env_t *env, 
00497         axutil_array_list_t *list);
00498 
00499 /* 
00500  * Add a statement to the assertin.
00501  * @param assertion SAML assertion object
00502  * @param env pointer to environment struct
00503  * @param cond a pointer to a statement to be added
00504  */
00505 AXIS2_EXTERN int AXIS2_CALL 
00506 saml_assertion_add_statement(
00507         saml_assertion_t *assertion, 
00508         const axutil_env_t *env, 
00509         saml_stmt_t *stmt);
00510 
00511 /*
00512  * Remove a statement from the assertion.
00513  * @param assertion SAML assertion object
00514  * @param env pointer to environment struct
00515  */
00516 AXIS2_EXTERN int AXIS2_CALL 
00517 saml_assertion_remove_statement(
00518         saml_assertion_t *assertion, 
00519         const axutil_env_t *env, 
00520         int index);
00521 
00522 /* 
00523  * Set the minor vertion of the assertion
00524  * @param assertion SAML assertion object
00525  * @param env pointer to environment struct
00526  * @param version minor version number
00527  */ 
00528 AXIS2_EXTERN int AXIS2_CALL 
00529 saml_assertion_set_minor_version(
00530         saml_assertion_t *assertion, 
00531         const axutil_env_t *env, 
00532         int version);
00533 
00534 /* 
00535  * Set the minor vertion of the assertion
00536  * @param assertion SAML assertion object
00537  * @param env pointer to environment struct
00538  */ 
00539 AXIS2_EXTERN int AXIS2_CALL 
00540 saml_assertion_set_issuer(
00541         saml_assertion_t *assertion, 
00542         const axutil_env_t *env, 
00543         axis2_char_t *issuer);
00544 
00545 /* 
00546  * Set the issuer of the assertion
00547  * @param assertion SAML assertion object
00548  * @param env pointer to environment struct
00549  * @instant time of the saml issue
00550  */
00551 AXIS2_EXTERN int AXIS2_CALL 
00552 saml_assertion_set_issue_instant(
00553         saml_assertion_t *assertion, 
00554         const axutil_env_t *env, 
00555         axutil_date_time_t *instant);
00556 
00557 /* 
00558  * Specifies the time instant at which the validity interval begins.
00559  * @param assertion SAML assertion object
00560  * @param env pointer to environment struct
00561  * @instant time at which validity interval begins 
00562  */ 
00563 AXIS2_EXTERN int AXIS2_CALL 
00564 saml_assertion_set_not_before(
00565         saml_assertion_t *assertion, 
00566         const axutil_env_t *env, 
00567         axutil_date_time_t *time);
00568 
00569 /* 
00570  * Specifies the time instant at which the validity interval has ended
00571  * @param assertion SAML assertion object
00572  * @param env pointer to environment struct
00573  * @instant time at which validity interval has ended 
00574  */ 
00575 AXIS2_EXTERN int AXIS2_CALL 
00576 saml_assertion_set_not_on_or_after(
00577         saml_assertion_t *assertion, 
00578         const axutil_env_t *env, 
00579         axutil_date_time_t *time);
00580 
00581 /* 
00582  * Return SAML authority that created the assertion. The name of the issuer 
00583  * is provided as a string and it is unambiguous to the relying party.
00584  * @param assertion SAML assertion object
00585  * @param env pointer to environment struct
00586  */
00587 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
00588 saml_assertion_get_issuer(
00589         saml_assertion_t *assertion, 
00590         const axutil_env_t *env);
00591 
00592 /*
00593  * Return the time instant of issue.
00594  * @param assertion SAML assertion object
00595  * @param env pointer to environment struct
00596  */
00597 AXIS2_EXTERN axutil_date_time_t * AXIS2_CALL 
00598 saml_assertion_get_issue_instant(
00599         saml_assertion_t *assertion, 
00600         const axutil_env_t *env);
00601 
00602 /* 
00603  * Get the time instant at which the validity interval begins.
00604  * @param assertion SAML assertion object
00605  * @param env pointer to environment struct
00606  */ 
00607 AXIS2_EXTERN axutil_date_time_t * AXIS2_CALL 
00608 saml_assertion_get_not_before(
00609         saml_assertion_t *assertion, 
00610         const axutil_env_t *env);
00611 
00612 /* 
00613  * Get the time instant at which the validity interval has ended
00614  * @param assertion SAML assertion object
00615  * @param env pointer to environment struct
00616  */ 
00617 AXIS2_EXTERN axutil_date_time_t * AXIS2_CALL 
00618 saml_assertion_get_not_on_or_after(
00619         saml_assertion_t *assertion, 
00620         const axutil_env_t *env);
00621 
00622 /* sign methods */
00623 
00624 /* 
00625  * Get weather a assertion is signed. This is set when the Assertion is built 
00626  * from a om node.
00627  * @param assertion SAML assertion object
00628  * @param env pointer to environment struct
00629  * @return AXIS2_TRUE if signed.
00630  */
00631 AXIS2_EXTERN int AXIS2_CALL
00632 saml_assertion_is_signed(
00633         saml_assertion_t *assertion, 
00634         const axutil_env_t *env);
00635 
00636 /*
00637  * Get weather a assertion is set to be signed. This applies when building 
00638  * the SAML object programmatically.
00639  * @param assertion SAML assertion object
00640  * @param env pointer to environment struct
00641  * @return AXIS2_TRUE if the object model is set to be signed.
00642  */
00643 AXIS2_EXTERN int AXIS2_CALL
00644 saml_assertion_is_sign_set(
00645         saml_assertion_t *assertion, 
00646         const axutil_env_t *env);
00647 
00648 /*
00649  * Verify the assertion according to the sign context set in the 
00650  * saml_assertion_set_default_signature or saml_assertion_set_signature method.
00651  * @param assertion SAML assertion object
00652  * @param env pointer to environment struct
00653  */
00654 AXIS2_EXTERN int AXIS2_CALL
00655 saml_assertion_signature_verify(
00656         saml_assertion_t *assertion, 
00657         const axutil_env_t *env);
00658 
00659 /* 
00660  * Sign the assertion using the information set in the 
00661  * saml_assertion_set_default_signature or saml_assertion_set_signature method.
00662  * @param assertion SAML assertion object
00663  * @param env pointer to environment struct
00664  */
00665 AXIS2_EXTERN int AXIS2_CALL
00666 saml_assertion_sign(
00667         saml_assertion_t *assertion, 
00668         axiom_node_t *node, 
00669         const axutil_env_t *env);
00670 
00671 /* 
00672  * Remove the information set for signing or verifying the assertion.
00673  * @param assertion SAML assertion object
00674  * @param env pointer to environment struct
00675  */
00676 AXIS2_EXTERN int AXIS2_CALL 
00677 saml_assertion_unsign(
00678         saml_assertion_t *assertion, 
00679         const axutil_env_t *env);
00680 
00681 /* 
00682  * Set the information required to sign the message. 
00683  * @param assertion SAML assertion object
00684  * @param env pointer to environment struct
00685  * @param sign_ctx oxs_sign_ctx_t object which contains the sign information
00686  */
00687 AXIS2_EXTERN int AXIS2_CALL 
00688 saml_assertion_set_default_signature(
00689         saml_assertion_t *assertion, 
00690         const axutil_env_t *env, 
00691         oxs_sign_ctx_t *sign_ctx);
00692 
00693 /* 
00694  * Set the information required to sign the message.
00695  * @param assertion SAML assertion object
00696  * @param env pointer to environment struct
00697  * @param sign_ctx oxs_sign_ctx_t object which contains the sign information
00698  */
00699 AXIS2_EXTERN int AXIS2_CALL 
00700 saml_assertion_set_signature(
00701         saml_assertion_t *assertion, 
00702         const axutil_env_t *env, 
00703         oxs_sign_ctx_t *sign_ctx);
00704 
00705 
00706 /* statement */
00707 
00708 /* 
00709  * Create a saml statement. Statement is a generic object which can hold 
00710  * tatement object can hold other statements like Autherization statements.
00711  * @param env pointer to environment struct 
00712  * @return saml_stmt object to hold other staments
00713  */
00714 AXIS2_EXTERN saml_stmt_t * AXIS2_CALL 
00715 saml_stmt_create(
00716         const axutil_env_t *env);
00717 
00718 /* 
00719  * Free a saml statment. 
00720  * @param stmt SAML stmt object
00721  * @param env pointer to environment struct
00722  */
00723 AXIS2_EXTERN void AXIS2_CALL 
00724 saml_stmt_free(
00725         saml_stmt_t *stmt, 
00726         const axutil_env_t *env);
00727 
00728 /* 
00729  * Build a saml statement from a XML node. The statement types that are 
00730  * supported are Authentication Statement, Attribute Statement, 
00731  * Authentication Dicision Statement.
00732  * @param stmt SAML stmt object
00733  * @param env pointer to environment struct
00734  */
00735 AXIS2_EXTERN int AXIS2_CALL 
00736 saml_stmt_build(
00737         saml_stmt_t *stmt, 
00738         axiom_node_t *node, 
00739         const axutil_env_t *env);
00740 
00741 /*
00742  * Serialize a statement to a axiom node.
00743  * @param stmt SAML stmt object
00744  * @param parent if specified created node will be a child of this  
00745  * @param env pointer to environment struct
00746  */
00747 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
00748 saml_stmt_to_om(saml_stmt_t *stmt, axiom_node_t *parent, const axutil_env_t *env);
00749 
00750 /*
00751  * Get the type of the statement. 
00752  * @param stmt SAML stmt object
00753  * @param env pointer to environment struct
00754  * @return statment type as saml_stmt_type_t
00755  */
00756 AXIS2_EXTERN saml_stmt_type_t AXIS2_CALL 
00757 saml_stmt_get_type(saml_stmt_t *stmt, const axutil_env_t *env);
00758 
00759 /*
00760  * Return the specific stament in this statement. 
00761  * @param stmt SAML stmt object
00762  * @param env pointer to environment struct
00763  */
00764 AXIS2_EXTERN saml_stmt_t * AXIS2_CALL 
00765 saml_stmt_get_stmt(saml_stmt_t *stmt, const axutil_env_t *env);
00766 
00767 /* 
00768  * Set the type of statement.
00769  * @param stmt SAML stmt object
00770  * @param env pointer to environment struct
00771  * @param type type of the statement as saml_stmt_type_t 
00772  */
00773 AXIS2_EXTERN int AXIS2_CALL 
00774 saml_stmt_set_type(saml_stmt_t *stmt, const axutil_env_t *env, saml_stmt_type_t type);
00775 
00776 /*
00777  * Set the statement. If a statment is already specified it will be freed.
00778  * @param stmt SAML stmt object
00779  * @param env pointer to environment struct
00780  * @param st pointer to the statement to be set
00781  * @param type type of the statement as saml_stmt_type_t 
00782  */
00783 AXIS2_EXTERN int AXIS2_CALL 
00784 saml_stmt_set_stmt(saml_stmt_t *stmt, const axutil_env_t *env, 
00785                                    void *st, saml_stmt_type_t type);
00786 
00787 
00788 /*AXIS2_EXTERN int AXIS2_CALL saml_id_init(saml_id_t *id, const axutil_env_t *env);*/
00789 AXIS2_EXTERN axis2_char_t * AXIS2_CALL saml_id_generate_random_bytes(const axutil_env_t *env);
00790 /*AXIS2_EXTERN void AXIS2_CALL saml_id_uninit(saml_id_t *id, const axutil_env_t *env);*/
00791 
00792 
00793 /* AuthorityBinding */
00794 
00795 /*
00796  * Creates a SAML AuthorityBinding.
00797  * @param env pointer to environment struct
00798  */
00799 AXIS2_EXTERN saml_auth_binding_t * AXIS2_CALL 
00800 saml_auth_binding_create(const axutil_env_t *env);
00801 
00802 /*
00803  * Free a SAML Autherity binding.
00804  * @param auth_bind SAML Autherity binding object
00805  * @param env pointer to environment struct
00806  */
00807 AXIS2_EXTERN void AXIS2_CALL 
00808 saml_auth_binding_free(saml_auth_binding_t *auth_bind, const axutil_env_t *env);
00809 
00810 /*
00811  * Create a SAML autherity binding from a XML node.
00812  * @param auth_bind SAML Autherity binding object
00813  * @param node XML node containing the autherity binding 
00814  * @param env pointer to environment struct 
00815  */
00816 AXIS2_EXTERN int AXIS2_CALL 
00817 saml_auth_binding_build(saml_auth_binding_t *auth_bind, 
00818                                                 axiom_node_t *node, const axutil_env_t *env);
00819 
00820 /*
00821  * Serialize an auth binding to axiom node
00822  * @param auth_bind SAML Autherity binding object
00823  * @param parent if specified created node will be a child of this node  
00824  * @param env pointer to environment struct 
00825  */
00826 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
00827 saml_auth_binding_to_om(saml_auth_binding_t *auth_binding, 
00828                                                 axiom_node_t *parent, const axutil_env_t *env);
00829 
00830 /*
00831  * Return the type of SAML protocol queries to which the authority described 
00832  * by this element will respond.
00833  * @param auth_bind SAML Autherity binding object
00834  * @param env pointer to environment struct 
00835  */
00836 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
00837 saml_auth_binding_get_authoity_kind(saml_auth_binding_t *auth_bind, 
00838                                                                         const axutil_env_t *env);
00839 
00840 /*
00841  * Return the URI identifying the SAML protocol binding to use in 
00842  * communicating with the authority.
00843  * @param auth_bind SAML Autherity binding object
00844  * @param env pointer to environment struct 
00845  */
00846 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
00847 saml_auth_binding_get_binding(saml_auth_binding_t *auth_binding, 
00848                                                           const axutil_env_t *env);
00849 
00850 /*
00851  * Return a URI describing how to locate and communicate with the authority
00852  * @param auth_bind SAML Autherity binding object
00853  * @param env pointer to environment struct 
00854  */
00855 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
00856 saml_auth_binding_get_location(saml_auth_binding_t *auth_bind, 
00857                                                            const axutil_env_t *env);
00858 
00859 /*
00860  * Set the type of SAML protocol queries to which the authority described 
00861  * by this element will respond.
00862  * @param auth_bind SAML Autherity binding object
00863  * @param env pointer to environment struct 
00864  * @param auth_kind A string representing the SAML protocol queries 
00865  */
00866 AXIS2_EXTERN int AXIS2_CALL 
00867 saml_auth_binding_set_authority_kind(saml_auth_binding_t *auth_bind, 
00868                                                                          const axutil_env_t *env, axis2_char_t *auth_kind);
00869 
00870 /*
00871  * Set the URI identifying the SAML protocol binding to use in 
00872  * communicating with the authority.
00873  * @param auth_bind SAML Autherity binding object
00874  * @param env pointer to environment struct 
00875  * @param binding URI identifying the SAML protocol binding 
00876  */
00877 AXIS2_EXTERN int AXIS2_CALL 
00878 saml_auth_binding_set_binding(saml_auth_binding_t *auth_bind, 
00879                                                           const axutil_env_t *env, axis2_char_t *binding);
00880 
00881 /*
00882  * Set a URI describing how to locate and communicate with the authority
00883  * @param auth_bind SAML Autherity binding object
00884  * @param env pointer to environment struct 
00885  * @param location URI describing location and communication protocol
00886  */
00887 AXIS2_EXTERN int AXIS2_CALL 
00888 saml_auth_binding_set_location(saml_auth_binding_t *auth_bind, 
00889                                                            const axutil_env_t *env, axis2_char_t *location);
00890 
00891 
00892 /* subject locality */
00893 
00894 /*
00895  * Create a SAML subject locality.
00896  * @param env pointer to environment struct 
00897  */
00898 AXIS2_EXTERN saml_subject_locality_t * AXIS2_CALL 
00899 saml_subject_locality_create(const axutil_env_t *env);
00900 
00901 /*
00902  * Free a SAML subject locality.
00903  * @param sub_locality SAML subject locality object
00904  * @param env pointer to environment struct 
00905  */
00906 AXIS2_EXTERN void AXIS2_CALL 
00907 saml_subject_locality_free(saml_subject_locality_t *sub_locality, 
00908                                                    const axutil_env_t *env);
00909 
00910 /*
00911  * Populate a SAML subject locality from a XML node containing a SAML 
00912  * subject locality.
00913  * @param sub_locality SAML subject locality object
00914  * @param node XML node containing the SAML subject locality
00915  * @param env pointer to environment struct 
00916  */
00917 AXIS2_EXTERN int AXIS2_CALL 
00918 saml_subject_locality_build(saml_subject_locality_t *sub_locality, 
00919                                                         axiom_node_t *node, const axutil_env_t *env);
00920 
00921 /*
00922  * Serialize a subject locality to an axiom node.
00923  * @param sub_locality SAML subject locality object
00924  * @param parent if specified created node will be a child of this node  
00925  * @param env pointer to environment struct 
00926  */
00927 AXIS2_EXTERN axiom_node_t *AXIS2_CALL 
00928 saml_subject_locality_to_om(saml_subject_locality_t *sub_locality, 
00929                                                         axiom_node_t *parent, const axutil_env_t *env);
00930 
00931 /*
00932  * Return the IP address of the system entity that was authenticated.
00933  * @param sub_locality SAML subject locality object
00934  * @param env pointer to environment struct 
00935  * @return IP address
00936  */
00937 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
00938 saml_subject_locality_get_ip(saml_subject_locality_t *sub_locality, 
00939                                                          const axutil_env_t *env);
00940 
00941 /*
00942  * Return the DNS address of the system entity that was authenticated.
00943  * @param sub_locality SAML subject locality object
00944  * @param env pointer to environment struct 
00945  * @return DNS address
00946  */
00947 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
00948 saml_subject_locality_get_dns(saml_subject_locality_t *sub_locality, 
00949                                                           const axutil_env_t *env);
00950 
00951 /*
00952  * Set the IP address of the system entity that was authenticated.
00953  * @param sub_locality SAML subject locality object
00954  * @param env pointer to environment struct 
00955  * @param ip IP address
00956  */
00957 AXIS2_EXTERN int AXIS2_CALL 
00958 saml_subject_locality_set_ip(saml_subject_locality_t *sub_locality, 
00959                                                          const axutil_env_t *env, axis2_char_t *ip);
00960 
00961 /*
00962  * Set the DNS address of the system entity that was authenticated.
00963  * @param sub_locality SAML subject locality object
00964  * @param env pointer to environment struct 
00965  * @param ip DNS address
00966  */
00967 AXIS2_EXTERN int AXIS2_CALL 
00968 saml_subject_locality_set_dns(saml_subject_locality_t *sub_locality, 
00969                                                           const axutil_env_t *env, axis2_char_t *dns);
00970 
00971 
00972 /* subject */
00973 
00974 /*
00975  * Create a SAML subject
00976  * @param env pointer to environment struct 
00977  */
00978 AXIS2_EXTERN saml_subject_t * AXIS2_CALL 
00979 saml_subject_create(const axutil_env_t *env);
00980 
00981 /*
00982  * Free a SAML subject
00983  * @param subject SAML subject object
00984  * @param env pointer to environment struct 
00985  */
00986 AXIS2_EXTERN void AXIS2_CALL 
00987 saml_subject_free(saml_subject_t *subject, const axutil_env_t *env);
00988 
00989 /*
00990  * Populates a SAML subject from a XML node containing a SAML subject.
00991  * @param subject SAML subject object
00992  * @param node XML node containing the SAML subject locality
00993  * @param env pointer to environment struct 
00994  */
00995 AXIS2_EXTERN int AXIS2_CALL 
00996 saml_subject_build(saml_subject_t *subject, 
00997                                    axiom_node_t *node, const axutil_env_t *env);
00998 
00999 /*
01000  * Serialize a SAML subject to a axiom node.
01001  * @param subject SAML subject object
01002  * @param parent if specified created node will be a child of this node  
01003  * @param env pointer to environment struct 
01004  */
01005 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01006 saml_subject_to_om(saml_subject_t *subject, 
01007                                    axiom_node_t *parent, const axutil_env_t *env);
01008 
01009 /*
01010  * Return the named id of the subject.
01011  * @param subject SAML subject object
01012  * @param env pointer to environment struct 
01013  * @return named id object
01014  */
01015 AXIS2_EXTERN saml_named_id_t * AXIS2_CALL 
01016 saml_subject_get_named_id(saml_subject_t *subject, const axutil_env_t *env);
01017 
01018 /*
01019  * Return the list of confirmation methods. Array list contains string values.
01020  * @param subject SAML subject object
01021  * @param env pointer to environment struct 
01022  * @return list containing the subject confirmation methods
01023  */
01024 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
01025 saml_subject_get_confirmation_methods(saml_subject_t *subject, 
01026                                                                           const axutil_env_t *env);
01027 
01028 /*
01029  * Return the list of confirmation data. Array list contains string values.
01030  * @param subject SAML subject object
01031  * @param env pointer to environment struct 
01032  * @return list containing the subject confirmation data
01033  */
01034 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01035 saml_subject_get_confirmation_data(saml_subject_t *subject, const axutil_env_t *env);
01036 
01037 /*
01038  * Return an axiom node containing the key info of this subject. The axiom node 
01039  * is a ds:keyinfo of XML signature. 
01040  * @param subject SAML subject object
01041  * @param env pointer to environment struct 
01042  */
01043 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01044 saml_subject_get_key_info(saml_subject_t *subject, const axutil_env_t *env);
01045 
01046 /*
01047  * Set the named id of the subject.
01048  * @param subject SAML subject object
01049  * @param env pointer to environment struct  
01050  * @param named_id a named id to be set
01051  */
01052 AXIS2_EXTERN int AXIS2_CALL 
01053 saml_subject_set_named_id(saml_subject_t *subject, 
01054                                                   const axutil_env_t *env, saml_named_id_t *named_id);
01055 
01056 /*
01057  * Set the confirmation as a array list. The array list should contain 
01058  * string values. If confirmation methods are already present they will 
01059  * be freed.
01060  * @param subject SAML subject object
01061  * @param env pointer to environment struct  
01062  * @param list list of confirmation methods
01063  */
01064 AXIS2_EXTERN int AXIS2_CALL 
01065 saml_subject_set_confirmation_methods(saml_subject_t *subject, 
01066                                                                           const axutil_env_t *env, 
01067                                                                           axutil_array_list_t *list);
01068 /* 
01069  * Add a subject confirmation to this subject.
01070  * @param subject SAML subject object
01071  * @param env pointer to environment struct
01072  * @param sub_confirmation subject confirmation
01073  */
01074 AXIS2_EXTERN int AXIS2_CALL 
01075 saml_subject_add_confirmation(saml_subject_t *subject, 
01076                                                           const axutil_env_t *env, 
01077                                                           axis2_char_t *sub_confirmation);
01078 
01079 /* 
01080  * Remove a subject confirmatin at the specified index.
01081  * @param subject SAML subject object
01082  * @param env pointer to environment struct
01083  * @param index index of the subject confirmation
01084  */
01085 AXIS2_EXTERN int AXIS2_CALL 
01086 saml_subject_remove_subject_confiirmation(saml_subject_t *subject, 
01087                                                                                   const axutil_env_t *env, int index);
01088 
01089 /* 
01090  * Set an XML Signature keyinfo element that provides access to a cryptographic 
01091  * key held by the subject
01092  * @param subject SAML subject object
01093  * @param env pointer to environment struct
01094  * @param node XML signature keyinfo element
01095  */
01096 AXIS2_EXTERN int AXIS2_CALL 
01097 saml_subject_set_key_info(saml_subject_t *subject, 
01098                                                   const axutil_env_t *env, axiom_node_t *node);
01099 
01100 /* subject statement */
01101 
01102 /*
01103  * Builds a subject statement from a om node containing a subject statement.
01104  * @param subject_stmt a subject statement object
01105  * @param node om node containing a subject statement
01106  * @param env pointer to environment struct
01107  */ 
01108 AXIS2_EXTERN int AXIS2_CALL 
01109 saml_subject_stmt_build(saml_subject_stmt_t *subject_stmt, 
01110                                                 axiom_node_t *node, const axutil_env_t *env);
01111 
01112 /* 
01113  * Free a subject statement object
01114  * @param subject_stmt a subject statement object 
01115  * @param env pointer to environment struct
01116  */
01117 AXIS2_EXTERN void AXIS2_CALL 
01118 saml_subject_stmt_free(saml_subject_stmt_t *subject_stmt, 
01119                                            const axutil_env_t *env);
01120 
01121 /* 
01122  * Create a subject statment object
01123  * @param env pointer to environment struct
01124  * @return a subject statement object
01125  */
01126 AXIS2_EXTERN saml_subject_stmt_t * AXIS2_CALL 
01127 saml_subject_stmt_create(const axutil_env_t *env);
01128 
01129 /*
01130  * Serialize a subject statment to an axiom node
01131  * @param subject_stmt a subject statement object 
01132  * @param parent if specified created node will be a child of this node  
01133  * @param env pointer to environment struct 
01134  */
01135 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01136 saml_subject_stmt_to_om(saml_subject_stmt_t *subject_stmt, 
01137                                                 axiom_node_t *parent, const axutil_env_t *env);
01138 
01139 /* 
01140  * Set the subject of the subject statement
01141  * @param subject_stmt a subject statement object 
01142  * @param env pointer to environment struct 
01143  * @param subject subject to be set
01144  */
01145 AXIS2_EXTERN int AXIS2_CALL 
01146 saml_subject_stmt_set_subject(saml_subject_stmt_t *subject_stmt, 
01147                                                           const axutil_env_t *env, saml_subject_t *subject);
01148 
01149 /*
01150  * Set the subject of the subject statement
01151  * @param subject_stmt a subject statement object 
01152  * @param env pointer to environment struct 
01153  * @param subject subject to be set
01154  */
01155 AXIS2_EXTERN saml_subject_t * AXIS2_CALL 
01156 saml_subject_stmt_get_subject(saml_subject_stmt_t *subject_stmt, 
01157                                                           const axutil_env_t *env);
01158 
01159 /* auth desicin statement */
01160 /*
01161  * Create an autherization decision statement object.
01162  * @param env pointer to environment struct 
01163  * @return an autherization decision statement object
01164  */
01165 AXIS2_EXTERN saml_auth_desicion_stmt_t * AXIS2_CALL 
01166 saml_auth_desicion_stmt_create(const axutil_env_t *env);
01167 
01168 /*
01169  * Free an autherization decision statement object.
01170  * @param auth_des_stmt a autherization decision statement object
01171  * @param env pointer to environment struct 
01172  */
01173 AXIS2_EXTERN void AXIS2_CALL 
01174 saml_auth_desicion_stmt_free(saml_auth_desicion_stmt_t *auth_des_stmt, 
01175                                                          const axutil_env_t *env);
01176 
01177 /*
01178  * Populates an saml_auth_desicion_stmt_t object from a XML node containing
01179  * autherization decision statement.
01180  * @param auth_des_stmt a autherization decision statement object
01181  * @param node xml node containing autherization decision object.
01182  * @param env pointer to environment struct 
01183  */
01184 AXIS2_EXTERN int AXIS2_CALL 
01185 saml_auth_desicion_stmt_build(saml_auth_desicion_stmt_t *auth_des_stmt, 
01186                                                           axiom_node_t *node, const axutil_env_t *env);
01187 
01188 /*
01189  * Serialize an saml_auth_desicion_stmt_t object to a axiom node.
01190  * @param auth_des_stmt a autherization decision statement object
01191  * @param parent if specified created node will be a child of this node  
01192  * @param env pointer to environment struct 
01193  */
01194 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01195 saml_auth_desicion_stmt_to_om(saml_auth_desicion_stmt_t *auth_des_stmt, 
01196                                                           axiom_node_t *parent, const axutil_env_t *env);
01197 
01198 /*
01199  * Get the subject which is in this autheization decision statement.
01200  * @param auth_des_stmt a autherization decision statement object
01201  * @param env pointer to environment struct 
01202  */
01203 AXIS2_EXTERN saml_subject_t * AXIS2_CALL 
01204 saml_auth_desicion_stmt_get_subject(saml_auth_desicion_stmt_t *auth_des_stmt, 
01205                                                                         const axutil_env_t *env);
01206 /*
01207  * Return a URI reference identifying the resource to which access 
01208  * authorization is sought.
01209  * @param auth_des_stmt a autherization decision statement object
01210  * @param env pointer to environment struct 
01211  */
01212 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01213 saml_auth_desicion_stmt_get_resource(saml_auth_desicion_stmt_t *auth_des_stmt, 
01214                                                                          const axutil_env_t *env);
01215 
01216 /*
01217  * Return the decision rendered by the SAML authority with respect to 
01218  * the specified resource. 
01219  * @param auth_des_stmt a autherization decision statement object
01220  * @param env pointer to environment struct 
01221  */
01222 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01223 saml_auth_desicion_stmt_get_desicion(saml_auth_desicion_stmt_t *auth_des_stmt, 
01224                                                                          const axutil_env_t *env);
01225 
01226 /* 
01227  * Return the list of actions authorized to be performed on the specified 
01228  * resource.
01229  * @param auth_des_stmt a autherization decision statement object
01230  * @param env pointer to environment struct 
01231  */
01232 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
01233 saml_auth_desicion_stmt_get_actions(saml_auth_desicion_stmt_t *auth_des_stmt, 
01234                                                                         const axutil_env_t *env);
01235 
01236 /*
01237  * Return the list of assertions that the SAML authority relied on in making 
01238  * the decision.
01239  * @param auth_des_stmt a autherization decision statement object
01240  * @param env pointer to environment struct 
01241  */
01242 AXIS2_EXTERN saml_evidence_t * AXIS2_CALL 
01243 saml_auth_desicion_stmt_get_evidence(saml_auth_desicion_stmt_t *auth_des_stmt, 
01244                                                                          const axutil_env_t *env);
01245 
01246 /*
01247  * Set a URI reference identifying the resource to which access 
01248  * authorization is sought.
01249  * @param auth_des_stmt a autherization decision statement object
01250  * @param env pointer to environment struct 
01251  * @param resource a URI referencing the resource
01252  */
01253 AXIS2_EXTERN int AXIS2_CALL 
01254 saml_auth_desicion_stmt_set_resource(saml_auth_desicion_stmt_t *auth_des_stmt, 
01255                                                                          const axutil_env_t *env, axis2_char_t *resource);
01256 
01257 /*
01258  * Set the decision rendered by the SAML authority with respect to 
01259  * the specified resource as a string value. Valid decisions are Permit, 
01260  * Deny and Indeterminate.
01261  * @param auth_des_stmt a autherization decision statement object
01262  * @param env pointer to environment struct 
01263  * @param decision set the decision.
01264  */
01265 AXIS2_EXTERN int AXIS2_CALL 
01266 saml_auth_desicion_stmt_set_desicion(saml_auth_desicion_stmt_t *auth_des_stmt, 
01267                                                                          const axutil_env_t *env, axis2_char_t *desicion);
01268 
01269 /* 
01270  * Set the list of actions authorized to be performed on the specified 
01271  * resource.
01272  * @param auth_des_stmt a autherization decision statement object
01273  * @param env pointer to environment struct 
01274  * @param list list containing action objects
01275  */
01276 AXIS2_EXTERN int AXIS2_CALL 
01277 saml_auth_desicion_stmt_set_actions(saml_auth_desicion_stmt_t *auth_des_stmt, 
01278                                                                         const axutil_env_t *env, axutil_array_list_t *list);
01279 
01280 /*
01281  * Remove an action in the specified index.
01282  * @param auth_des_stmt a autherization decision statement object
01283  * @param env pointer to environment struct 
01284  */
01285 AXIS2_EXTERN int AXIS2_CALL 
01286 saml_auth_desicion_stmt_remove_action(saml_auth_desicion_stmt_t *auth_des_stmt, 
01287                                                                           const axutil_env_t *env, int index);
01288 
01289 /*
01290  * Add an action.
01291  * @param auth_des_stmt a autherization decision statement object
01292  * @param env pointer to environment struct 
01293  * @param action action object to be added
01294  */
01295 AXIS2_EXTERN int AXIS2_CALL 
01296 saml_auth_desicion_stmt_add_action(saml_auth_desicion_stmt_t *auth_des_stmt, 
01297                                                                    const axutil_env_t *env, saml_action_t *action);
01298 
01299 /*
01300  * Set the subject of the autherization decision object
01301  * @param auth_des_stmt a autherization decision statement object
01302  * @param env pointer to environment struct 
01303  * @param subject subject to be added
01304  */
01305 AXIS2_EXTERN int AXIS2_CALL 
01306 saml_auth_desicion_stmt_set_subject(saml_auth_desicion_stmt_t *auth_des_stmt, 
01307                                                                         const axutil_env_t *env, saml_subject_t *subject);
01308 
01309 /* auth statement */
01310 
01311 /*
01312  * Create an autherization statement.
01313  * @param env pointer to environment struct 
01314  * @return autherization statement object
01315  */ 
01316 AXIS2_EXTERN saml_auth_stmt_t * AXIS2_CALL 
01317 saml_auth_stmt_create(const axutil_env_t *env);
01318 
01319 /*
01320  * Free a autherization statement.
01321  * @param auth_stmt autherization statment object
01322  * @param env pointer to environment struct 
01323  */
01324 AXIS2_EXTERN void AXIS2_CALL 
01325 saml_auth_stmt_free(saml_auth_stmt_t *auth_stmt, const axutil_env_t *env);
01326 
01327 /*
01328  * Populates an auth_stmt from a om node containing a autherization statement
01329  * @param auth_stmt autherization statment object
01330  * @param node an om node containing an autherization statement
01331  * @param env pointer to environment struct 
01332  */
01333 AXIS2_EXTERN int AXIS2_CALL 
01334 saml_auth_stmt_build(saml_auth_stmt_t *auth_stmt, 
01335                                          axiom_node_t *node, const axutil_env_t *env);
01336 
01337 /*
01338  * Serialize an autherization statement to an om node
01339  * @param auth_stmt autherization statment object
01340  * @param parent if specified created node will be a child of this node  
01341  * @param env pointer to environment struct 
01342  */
01343 AXIS2_EXTERN axiom_node_t *AXIS2_CALL 
01344 saml_auth_stmt_to_om(saml_auth_stmt_t *auth_stmt, 
01345                                          axiom_node_t *parent, const axutil_env_t *env);
01346 
01347 /*
01348  * Return a URI reference that specifies the type of authentication that 
01349  * took place.
01350  * @param auth_stmt autherization statment object
01351  * @param env pointer to environment struct
01352  * @return URI reference 
01353  */
01354 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01355 saml_auth_stmt_get_auth_method(saml_auth_stmt_t *auth_stmt, 
01356                                                            const axutil_env_t *env);
01357 
01358 /*
01359  * Return the time at which the authentication took place.
01360  * @param auth_stmt autherization statment object
01361  * @param env pointer to environment struct
01362  * @return time at which authentication took place 
01363  */
01364 AXIS2_EXTERN axutil_date_time_t * AXIS2_CALL 
01365 saml_auth_stmt_get_auth_instant(saml_auth_stmt_t *auth_stmt, 
01366                                                                 const axutil_env_t *env);
01367 
01368 /*
01369  * Return a list of additional information about the subject of 
01370  * the statement that may be available.
01371  * @param auth_stmt autherization statment object
01372  * @param env pointer to environment struct
01373  * @return a list of autherization binings
01374  */
01375 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
01376 saml_auth_stmt_get_auth_bindings(saml_auth_stmt_t *auth_stmt, 
01377                                                                  const axutil_env_t *env);
01378 
01379 /*
01380  * Return the IP address of the system entity that was authenticated.
01381  * @param auth_stmt autherization statment object
01382  * @param env pointer to environment struct
01383  * @return an IP address
01384  */
01385 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01386 saml_auth_stmt_get_subject_ip(saml_auth_stmt_t *auth_stmt, 
01387                                                           const axutil_env_t *env);
01388 /*
01389  * Return the DNS address of the system entity that was authenticated.
01390  * @param auth_stmt autherization statment object
01391  * @param env pointer to environment struct
01392  * @return an DNS address
01393  */
01394 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01395 saml_auth_stmt_get_subject_dns(saml_auth_stmt_t *auth_stmt, 
01396                                                            const axutil_env_t *env);
01397 
01398 /* 
01399  * Set the subject of the autherization statement
01400  * @param auth_stmt autherization statment object
01401  * @param env pointer to environment struct
01402  * @param subject a subject to be added
01403  */
01404 AXIS2_EXTERN int AXIS2_CALL 
01405 saml_auth_stmt_set_subject(saml_auth_stmt_t *auth_stmt, 
01406                                                    const axutil_env_t *env, saml_subject_t *subject);
01407 
01408 /*
01409  * Set a URI reference that specifies the type of authentication that 
01410  * took place.
01411  * @param auth_stmt autherization statment object
01412  * @param env pointer to environment struct
01413  * @param method URI reference 
01414  */
01415 AXIS2_EXTERN int AXIS2_CALL 
01416 saml_auth_stmt_set_auth_method(saml_auth_stmt_t *auth_stmt, 
01417                                                            const axutil_env_t *env, axis2_char_t *method);
01418 
01419 /*
01420  * Set the time at which the authentication took place.
01421  * @param auth_stmt autherization statment object
01422  * @param env pointer to environment struct
01423  * @param dt time at which authentication took place 
01424  */
01425 AXIS2_EXTERN int AXIS2_CALL 
01426 saml_auth_stmt_set_auth_instant(saml_auth_stmt_t *auth_stmt, 
01427                                                                 const axutil_env_t *env, axutil_date_time_t *dt);
01428 
01429 /*
01430  * Set a list of additional information about the subject of 
01431  * the statement that may be available as auth_bindings.
01432  * @param auth_stmt autherization statment object
01433  * @param env pointer to environment struct
01434  * @param list a list of autherization binings
01435  */
01436 AXIS2_EXTERN int AXIS2_CALL 
01437 saml_auth_stmt_set_auth_bindings(saml_auth_stmt_t *auth_stmt, 
01438                                                                  const axutil_env_t *env, axutil_array_list_t *list);
01439 
01440 /*
01441  * Add a additional information about the subject of 
01442  * the statement that may be available as an auth_binding.
01443  * @param auth_stmt autherization statment object
01444  * @param env pointer to environment struct
01445  * @param bind an authority binding
01446  */
01447 AXIS2_EXTERN int AXIS2_CALL 
01448 saml_auth_stmt_add_auth_binding(saml_auth_stmt_t *auth_stmt, 
01449                                                                 const axutil_env_t *env, saml_auth_binding_t *bind);
01450 
01451 /*
01452  * Remove an authority binding from a auth_statement.
01453  * @param auth_stmt autherization statment object
01454  * @param env pointer to environment struct
01455  * @param index index of the authority binding to be removed
01456  */
01457 AXIS2_EXTERN int AXIS2_CALL 
01458 saml_auth_stmt_remove_auth_binding(saml_auth_stmt_t *auth_stmt, 
01459                                                                    const axutil_env_t *env, int index);
01460 
01461 /*
01462  * Set the DNS address of the system entity that was authenticated.
01463  * @param auth_stmt autherization statment object
01464  * @param env pointer to environment struct
01465  * @param dns a DNS address
01466  */
01467 AXIS2_EXTERN int AXIS2_CALL 
01468 saml_auth_stmt_set_subject_dns(saml_auth_stmt_t *auth_stmt, 
01469                                                            const axutil_env_t *env, axis2_char_t *dns);
01470 
01471 /*
01472  * Set the IP address of the system entity that was authenticated.
01473  * @param auth_stmt autherization statment object
01474  * @param env pointer to environment struct
01475  * @param ip an IP address
01476  */
01477 AXIS2_EXTERN int AXIS2_CALL 
01478 saml_auth_stmt_set_subject_ip(saml_auth_stmt_t *auth_stmt, 
01479                                                           const axutil_env_t *env, axis2_char_t *ip);
01480 
01481 /* attribute statement */
01482 
01483 /*
01484  * Create a attribute statement.
01485  * @param env pointer to environment struct
01486  * @return saml attribute object
01487  */
01488 AXIS2_EXTERN saml_attr_stmt_t * AXIS2_CALL 
01489 saml_attr_stmt_create(const axutil_env_t *env);
01490 
01491 /*
01492  * Free an attribute statement.
01493  * @param attr_stmt pointer to an attribute statement object
01494  * @param env pointer to environment struct
01495  */
01496 AXIS2_EXTERN void AXIS2_CALL 
01497 saml_attr_stmt_free(saml_attr_stmt_t *attr_stmt, const axutil_env_t *env);
01498 
01499 /* 
01500  * Populates a attribute statement object from a axiom node containing a 
01501  * attribute statement.
01502  * @param attr_stmt pointer to an attribute statement object
01503  * @param node om node containing a attribute statement
01504  * @param env pointer to environment struct
01505  */
01506 AXIS2_EXTERN int AXIS2_CALL 
01507 saml_attr_stmt_build(saml_attr_stmt_t *attr_stmt, 
01508                                          axiom_node_t *node, const axutil_env_t *env);
01509 
01510 /*
01511  * Serialize an saml_attr_stmt to an om node
01512  * @param attr_stmt pointer to an attribute statement object
01513  * @param parent if specified created node will be a child of this node  
01514  * @param env pointer to environment struct
01515  */
01516 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01517 saml_attr_stmt_to_om(saml_attr_stmt_t *attr_stmt, 
01518                                          axiom_node_t *parent, const axutil_env_t *env);
01519 
01520 /*
01521  * Get the saml subject in this attribute statement.
01522  * @param attr_stmt pointer to an attribute statement object
01523  * @param env pointer to environment struct
01524  * @return saml subject
01525  */
01526 AXIS2_EXTERN saml_subject_t * AXIS2_CALL 
01527 saml_attr_stmt_get_subject(saml_attr_stmt_t *attr_stmt, const axutil_env_t *env);
01528 
01529 /*
01530  * Get the list of attributes in this attribute statement.
01531  * @param attr_stmt pointer to an attribute statement object
01532  * @param env pointer to environment struct
01533  * @return array list containing the attribute objects
01534  */
01535 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
01536 saml_attr_stmt_get_attributes(saml_attr_stmt_t *attr_stmt, const axutil_env_t *env);
01537 
01538 /*
01539  * Set the subject of this attribute statement
01540  * @param attr_stmt pointer to an attribute statement object
01541  * @param env pointer to environment struct
01542  * @param subject 
01543  */
01544 AXIS2_EXTERN int AXIS2_CALL 
01545 saml_attr_stmt_set_subject(saml_attr_stmt_t *attr_stmt, 
01546                                                    const axutil_env_t *env, saml_subject_t *subject);
01547 
01548 /*
01549  * Set the attributes of the attribute statement as a list. If the attribute 
01550  * statement already contains attributes they will be replaced.
01551  * @param attr_stmt pointer to an attribute statement object
01552  * @param env pointer to environment struct
01553  * @param list attribute list
01554  */
01555 AXIS2_EXTERN int AXIS2_CALL 
01556 saml_attr_stmt_set_attributes(saml_attr_stmt_t *attr_stmt, 
01557                                                           const axutil_env_t *env, axutil_array_list_t *list);
01558 
01559 /*
01560  * Add an attribute to the attribute statement       
01561  * @param attr_stmt pointer to an attribute statement object
01562  * @param env pointer to environment struct
01563  * @param attribute an attribute to be added
01564  */
01565 AXIS2_EXTERN int AXIS2_CALL 
01566 saml_attr_stmt_add_attribute(saml_attr_stmt_t *attr_stmt, 
01567                                                          const axutil_env_t *env, saml_attr_t *attribute);
01568 
01569 /* 
01570  * Remove an attribute at the given index.
01571  * @param attr_stmt pointer to an attribute statement object
01572  * @param env pointer to environment struct
01573  * @param index index of the attribute
01574  */
01575 AXIS2_EXTERN int AXIS2_CALL 
01576 saml_attr_stmt_remove_attribute(saml_attr_stmt_t *attr_stmt, 
01577                                                                 const axutil_env_t *env, int index);
01578 
01579 /* condition */
01580 
01581 /*
01582  * Create a generic condition. Condition objects holds more specific 
01583  * conditions. The type attribute of a condition determines the specific 
01584  * condition.
01585  * @param env pointer to environment struct
01586  */
01587 AXIS2_EXTERN saml_condition_t * AXIS2_CALL 
01588 saml_condition_create(const axutil_env_t *env);
01589 
01590 /*
01591  * Free a condition object. The specific condition which is in this conditions 
01592  * will also be freed.
01593  * @param cond pointer to a condition object
01594  * @param env pointer to environment struct
01595  */
01596 AXIS2_EXTERN void AXIS2_CALL 
01597 saml_condition_free(saml_condition_t *cond, const axutil_env_t *env);
01598 
01599 /*
01600  * Populates a condition from a om node containing a condition. After this a 
01601  * specific condition will be built and set to this condition. 
01602  * @param cond pointer to a condition object
01603  * @param env pointer to environment struct
01604  * @param node om node containing a condition
01605  */
01606 AXIS2_EXTERN int AXIS2_CALL 
01607 saml_condition_build(saml_condition_t *cond, 
01608                                          axiom_node_t *node, const axutil_env_t *env);
01609 
01610 /* 
01611  * Serialize a condition to a om node. 
01612  * @param cond pointer to a condition object
01613  * @param parent if specified created node will be a child of this node  
01614  * @param env pointer to environment struct
01615  */
01616 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01617 saml_condition_to_om(saml_condition_t *cond, 
01618                                          axiom_node_t *parent, const axutil_env_t *env);
01619 
01620 /*
01621  * Set the specific condition for this condition.
01622  * @param cond pointer to a condition object
01623  * @param env pointer to environment struct
01624  * @param condition the specific condition
01625  * @param type condition type
01626  */
01627 AXIS2_EXTERN int AXIS2_CALL 
01628 saml_condition_set_condition(saml_condition_t *cond, 
01629                                                          const axutil_env_t *env, void * condition, 
01630                                                          saml_cond_type_t type);
01631 
01632 /*
01633  * Set the type of the conition. 
01634  * @param cond pointer to a condition object
01635  * @param env pointer to environment struct
01636  * @param type specific type of the condition
01637  */
01638 AXIS2_EXTERN int AXIS2_CALL 
01639 saml_condition_set_type(saml_condition_t *cond, 
01640                                                 const axutil_env_t *env, saml_cond_type_t type);
01641 
01642 /*
01643  * Get the specific condtion in this generic condition.
01644  * @param cond pointer to a condition object
01645  * @param env pointer to environment struct
01646  */
01647 AXIS2_EXTERN void * AXIS2_CALL 
01648 saml_condition_get_condition(saml_condition_t *cond, const axutil_env_t *env);
01649 
01650 /*
01651  * Get the type of the specific condtion in this generic condition.
01652  * @param cond pointer to a condition object
01653  * @param env pointer to environment struct
01654  */
01655 AXIS2_EXTERN saml_cond_type_t AXIS2_CALL 
01656 saml_condition_get_type(saml_condition_t *cond, const axutil_env_t *env);
01657 
01658 /* audio restriction */
01659 
01660 /*
01661  * Populates an audi restriction condition from an om node.
01662  * @param arc a ponter to saml_aud_restriction_conf object
01663  * @param node om node containing an audience restriction condition
01664  * @param env pointer to environment struct
01665  */
01666 AXIS2_EXTERN int AXIS2_CALL 
01667 saml_audi_restriction_cond_build(saml_audi_restriction_cond_t *arc, 
01668                                                                  axiom_node_t *node, const axutil_env_t *env);
01669 
01670 /*
01671  * Serialize an saml_audi_restriction_cond_t object in to an om node.
01672  * @param arc a ponter to saml_aud_restriction_conf object
01673  * @param parent if specified created node will be a child of this node  
01674  * @param env pointer to environment struct
01675  */
01676 AXIS2_EXTERN axiom_node_t *AXIS2_CALL 
01677 saml_audi_restriction_cond_to_om(saml_audi_restriction_cond_t *arc, 
01678                                                                  axiom_node_t *parent, const axutil_env_t *env);
01679 
01680 /*
01681  * Free a saml_aud_restriction_conf object.
01682  * @param arc a ponter to saml_aud_restriction_conf object
01683  * @param env pointer to environment struct
01684  */
01685 AXIS2_EXTERN void AXIS2_CALL 
01686 saml_audi_restriction_cond_free(saml_audi_restriction_cond_t *arc, 
01687                                                                 const axutil_env_t *env);
01688 
01689 /*
01690  * Create a saml_aud_restriction_conf object.
01691  * @param env pointer to environment struct
01692  * @return a ponter to saml_aud_restriction_conf object
01693  */
01694 AXIS2_EXTERN saml_audi_restriction_cond_t * AXIS2_CALL 
01695 saml_audi_restriction_cond_create(const axutil_env_t *env);
01696 
01697 /*
01698  * Return a list of URI references that identifies a list of intended audiences.
01699  * @param arc a ponter to saml_aud_restriction_conf object
01700  * @param env pointer to environment struct
01701  */
01702 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
01703 saml_audi_restriction_cond_get_audiences(saml_audi_restriction_cond_t *arc, 
01704                                                                                  const axutil_env_t *env);
01705 
01706 /*
01707  * Set a list of URI references that identifies a list of intended audiences.
01708  * @param arc a ponter to saml_aud_restriction_conf object
01709  * @param env pointer to environment struct
01710  */
01711 AXIS2_EXTERN int AXIS2_CALL 
01712 saml_audi_restriction_cond_set_audiences(saml_audi_restriction_cond_t *cond, 
01713                                                                                  const axutil_env_t *env, axutil_array_list_t *list);
01714 
01715 /*
01716  * Remove a URI reference that identifies an intended audiences.
01717  * @param arc a ponter to saml_aud_restriction_conf object
01718  * @param env pointer to environment struct
01719  * @param index the number of the audience in the list, to be removed
01720  */
01721 AXIS2_EXTERN int AXIS2_CALL 
01722 saml_audi_restriction_cond_remove_audiences(saml_audi_restriction_cond_t *cond, 
01723                                                                                         const axutil_env_t *env, int index);
01724 
01725 /*
01726  * Ad a URI reference that identifies an intended audiences.
01727  * @param arc a ponter to saml_aud_restriction_conf object
01728  * @param env pointer to environment struct
01729  * @param audience a new audience to be added
01730  */
01731 AXIS2_EXTERN int AXIS2_CALL 
01732 saml_audi_restriction_cond_add_audience(saml_audi_restriction_cond_t *cond, 
01733                                                                                 const axutil_env_t *env, axis2_char_t *audience);
01734 
01735 
01736 /* action */
01737 
01738 /*
01739  * Create a saml_action_t.
01740  * @param env pointer to environment struct
01741  * @return pointer to saml_action_t 
01742  */
01743 AXIS2_EXTERN saml_action_t * AXIS2_CALL 
01744 saml_action_create(const axutil_env_t *env);
01745 
01746 /*
01747  * Free a saml_action_t.
01748  * @param action pointer to saml_action_t 
01749  * @param env pointer to environment struct
01750  */
01751 AXIS2_EXTERN void AXIS2_CALL 
01752 saml_action_free(saml_action_t *action, const axutil_env_t *env);
01753 
01754 /*
01755  * Populates a saml action from a om node containing a saml action.
01756  * @param action pointer to saml_action_t 
01757  * @param node om node conatining a saml action
01758  * @param env pointer to environment struct
01759  */
01760 AXIS2_EXTERN int AXIS2_CALL 
01761 saml_action_build(saml_action_t *action, axiom_node_t *node, const axutil_env_t *env);
01762 
01763 /*
01764  * Serialize a action_t object to an om node.
01765  * @param action pointer to saml_action_t 
01766  * @param parent if specified created node will be a child of this node  
01767  * @param env pointer to environment struct
01768  */
01769 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01770 saml_action_to_om(saml_action_t *action, 
01771                                   axiom_node_t *parent, const axutil_env_t *env);
01772 
01773 /*
01774  * Get an action sought to be performed on the specified resource.
01775  * @param action pointer to saml_action_t 
01776  * @param env pointer to environment struct
01777  */
01778 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01779 saml_action_get_data(saml_action_t *action, const axutil_env_t *env);
01780 
01781 /*
01782  * Get a URI reference representing the namespace in which the name of the 
01783  * specified action is to be interpreted.
01784  * @param action pointer to saml_action_t 
01785  * @param env pointer to environment struct
01786  */
01787 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01788 saml_action_get_namespace(saml_action_t *action, const axutil_env_t *env);
01789 
01790 /*
01791  * Set an action sought to be performed on the specified resource.
01792  * @param action pointer to saml_action_t 
01793  * @param env pointer to environment struct
01794  * @param data an action to be performed
01795  */
01796 AXIS2_EXTERN int AXIS2_CALL 
01797 saml_action_set_data(saml_action_t *action, const axutil_env_t *env, 
01798                                          axis2_char_t *data);
01799 
01800 /*
01801  * Set a URI reference representing the namespace in which the name of the 
01802  * specified action is to be interpreted.
01803  * @param action pointer to saml_action_t 
01804  * @param env pointer to environment struct
01805  * @param name_space a URI reference
01806  */
01807 AXIS2_EXTERN int AXIS2_CALL 
01808 saml_action_set_namespace(saml_action_t *action, const axutil_env_t *env, 
01809                                                   axis2_char_t *name_space);
01810 
01811 /* evidence */
01812 AXIS2_EXTERN saml_evidence_t * AXIS2_CALL 
01813 saml_evidence_create(const axutil_env_t *env);
01814 
01815 AXIS2_EXTERN void AXIS2_CALL 
01816 saml_evidence_free(saml_evidence_t *evidence, const axutil_env_t *env);
01817 
01818 AXIS2_EXTERN int AXIS2_CALL 
01819 saml_evidence_build(saml_evidence_t *evidence, 
01820                                         axiom_node_t *node, const axutil_env_t *env);
01821 
01822 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01823 saml_evidence_to_om(saml_evidence_t *evidence, axiom_node_t *parent, 
01824                                         const axutil_env_t *env);
01825 
01826 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
01827 saml_evidence_get_assertions(saml_evidence_t *evidence, const axutil_env_t *env);
01828 
01829 AXIS2_EXTERN axutil_array_list_t * AXIS2_CALL 
01830 saml_evidence_get_assertion_ids(saml_evidence_t *evidence, const axutil_env_t *env);
01831 
01832 AXIS2_EXTERN int AXIS2_CALL 
01833 saml_evidence_set_assertions(saml_evidence_t *evidence, 
01834                                                          const axutil_env_t *env, axutil_array_list_t *list);
01835 
01836 AXIS2_EXTERN int AXIS2_CALL 
01837 saml_evidence_remove_assertion(saml_evidence_t *evidence, 
01838                                                            const axutil_env_t *env, int index);
01839 
01840 AXIS2_EXTERN int AXIS2_CALL 
01841 saml_evidence_add_assertion(saml_evidence_t *evidence, 
01842                                                         const axutil_env_t *env, saml_assertion_t *assertion);
01843 
01844 AXIS2_EXTERN int AXIS2_CALL 
01845 saml_evidence_set_assertion_ids(saml_evidence_t *evidence, 
01846                                                                 const axutil_env_t *env, axutil_array_list_t *list);
01847 
01848 AXIS2_EXTERN int AXIS2_CALL 
01849 saml_evidence_remove_assertion_id(saml_evidence_t *evidence, 
01850                                                                   const axutil_env_t *env, int index);
01851 
01852 AXIS2_EXTERN int AXIS2_CALL 
01853 saml_evidence_add_assertion_id(saml_evidence_t *evidence, 
01854                                                            const axutil_env_t *env, axis2_char_t *assertion_id);
01855 
01856 /* atrribute designature */
01857 
01858 /* 
01859  * Create a saml_attr_desig_t. 
01860  * @param env pointer to environment struct
01861  * @return pointer to saml_attr_desig_t
01862  */
01863 AXIS2_EXTERN saml_attr_desig_t * AXIS2_CALL 
01864 saml_attr_desig_create(const axutil_env_t *env);
01865 
01866 /* 
01867  * Free a saml_attr_desig_t. 
01868  * @param attr_desig a pointer to saml_attr_desig_t
01869  * @param env pointer to environment struct 
01870  */
01871 AXIS2_EXTERN void AXIS2_CALL 
01872 saml_attr_desig_free(saml_attr_desig_t *attr_desig, const axutil_env_t *env);
01873 
01874 /*
01875  * Populates a saml_attr_desig_t from a om node contailing a saml attriibute desgnator
01876  * @param attr_desig a pointer to saml_attr_desig_t
01877  * @param node om node containing saml attriibute desgnator
01878  * @param env pointer to environment struct 
01879  */
01880 AXIS2_EXTERN int AXIS2_CALL 
01881 saml_attr_desig_build(saml_attr_desig_t *attr_desig, 
01882                                           axiom_node_t *node, const axutil_env_t *env);
01883 
01884 /*
01885  * Serialize a saml_attr_desig_t to an om node.
01886  * @param attr_desig a pointer to saml_attr_desig_t
01887  * @param parent if specified created node will be a child of this node  
01888  * @param env pointer to environment struct 
01889  */
01890 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01891 saml_attr_desig_to_om(saml_attr_desig_t *attr_desig, 
01892                                           axiom_node_t *parent, const axutil_env_t *env);
01893 
01894 /* 
01895  * Get the name of the attribute.
01896  * @param attr_desig a pointer to saml_attr_desig_t
01897  * @param env pointer to environment struct 
01898  * @return a string name of the attribute
01899  */
01900 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01901 saml_attr_desig_get_name(saml_attr_desig_t *attr_desig, const axutil_env_t *env);
01902 
01903 /*
01904  * Get the namespace in which the AttributeName elements are interpreted.
01905  * @param attr_desig a pointer to saml_attr_desig_t
01906  * @param env pointer to environment struct 
01907  * @return a string representing a namespace
01908  */
01909 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01910 saml_attr_desig_get_namespace(saml_attr_desig_t *attr_desig, const axutil_env_t *env);
01911 
01912 /* 
01913  * Set the name of the attribute.
01914  * @param attr_desig a pointer to saml_attr_desig_t
01915  * @param env pointer to environment struct 
01916  * @param name a string name of the attribute
01917  */
01918 AXIS2_EXTERN int AXIS2_CALL 
01919 saml_attr_desig_set_name(saml_attr_desig_t *attr_desig, 
01920                                                  const axutil_env_t *env, axis2_char_t *name);
01921 
01922 /*
01923  * Set the namespace in which the AttributeName elements are interpreted.
01924  * @param attr_desig a pointer to saml_attr_desig_t
01925  * @param env pointer to environment struct 
01926  * @param name_space a string representing a namespace
01927  */
01928 AXIS2_EXTERN int AXIS2_CALL 
01929 saml_attr_desig_set_namespace(saml_attr_desig_t *attr_desig, 
01930                                                           const axutil_env_t *env, axis2_char_t *name_space);
01931 
01932 /* attribute */
01933 
01934 /*
01935  * Create a saml_attr_t.
01936  * @param env pointer to environment struct 
01937  * @return pointer to saml_attr_t
01938  */
01939 AXIS2_EXTERN saml_attr_t * AXIS2_CALL 
01940 saml_attr_create(const axutil_env_t *env);
01941 
01942 /*
01943  * Free a saml_attr_t.
01944  * @param attr pointer to saml_attr_t
01945  * @param env pointer to environment struct 
01946  */
01947 AXIS2_EXTERN void AXIS2_CALL 
01948 saml_attr_free(saml_attr_t *attr, const axutil_env_t *env);
01949 
01950 /*
01951  * Populates a saml_attr_t from an om node containing a saml attribute.
01952  * @param attr pointer to saml_attr_t
01953  * @node an om node containing a saml attribute
01954  * @param env pointer to environment struct 
01955  */
01956 AXIS2_EXTERN int AXIS2_CALL 
01957 saml_attr_build(saml_attr_t *attr, axiom_node_t *node, const axutil_env_t *env);
01958 
01959 /*
01960  * Serialize a saml_attr_t in to an om node.
01961  * @param attr pointer to saml_attr_t
01962  * @param parent if specified created node will be a child of this node  
01963  * @param env pointer to environment struct 
01964  */
01965 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
01966 saml_attr_to_om(saml_attr_t *attr, axiom_node_t *parent, const axutil_env_t *env);
01967 
01968 /* 
01969  * Get the name of the attribute.
01970  * @param attr a pointer to saml_attr_t
01971  * @param env pointer to environment struct 
01972  * @return a string name of the attribute
01973  */
01974 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01975 saml_attr_get_name(saml_attr_t *attr, const axutil_env_t *env);
01976 
01977 /*
01978  * Get the namespace in which the AttributeName elements are interpreted.
01979  * @param attr a pointer to saml_attr_t
01980  * @param env pointer to environment struct 
01981  * @return a string representing a namespace
01982  */
01983 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
01984 saml_attr_get_namespace(saml_attr_t *attr_stmt, const axutil_env_t *env);
01985 
01986 /* 
01987  * Set the name of the attribute.
01988  * @param attr a pointer to saml_attr_t
01989  * @param env pointer to environment struct 
01990  * @param name a string name of the attribute
01991  */
01992 AXIS2_EXTERN int AXIS2_CALL 
01993 saml_attr_set_name(saml_attr_t *attr, const axutil_env_t *env, axis2_char_t *name);
01994 
01995 /*
01996  * Set the namespace in which the AttributeName elements are interpreted.
01997  * @param attr a pointer to saml_attr_t
01998  * @param env pointer to environment struct 
01999  * @param name_space a string representing a namespace
02000  */
02001 AXIS2_EXTERN int AXIS2_CALL 
02002 saml_attr_set_namespace(saml_attr_t *attr, const axutil_env_t *env, 
02003                                                 axis2_char_t *name_space);
02004 
02005 /*
02006  * Set the values of the attribute as a list of om nodes.
02007  * @param attr a pointer to saml_attr_t
02008  * @param env pointer to environment struct 
02009  * @param list a om node list
02010  */
02011 AXIS2_EXTERN int AXIS2_CALL 
02012 saml_attr_set_values(saml_attr_t *attr, const axutil_env_t *env, 
02013                                          axutil_array_list_t *list);
02014 
02015 /*
02016  * Remove om node at the specified index.
02017  * @param attr a pointer to saml_attr_t
02018  * @param env pointer to environment struct 
02019  * @param index index number of the om node to be removed
02020  */
02021 AXIS2_EXTERN int AXIS2_CALL 
02022 saml_attr_remove_value(saml_attr_t *attr, const axutil_env_t *env, int index);
02023 
02024 /*
02025  * Add a om node to the attribute value list.
02026  * @param attr a pointer to saml_attr_t
02027  * @param env pointer to environment struct 
02028  * @param value an om node
02029  */
02030 AXIS2_EXTERN int AXIS2_CALL 
02031 saml_attr_add_value(saml_attr_t *attr, const axutil_env_t *env, axiom_node_t *value);
02032 
02033 
02034 /*named id*/
02035 
02036 /*
02037  * Create a SAML named id object
02038  * @param env pointer to environment struct
02039  * @return saml named id object
02040  */
02041 AXIS2_EXTERN saml_named_id_t * AXIS2_CALL 
02042 saml_named_id_create(const axutil_env_t *env);
02043 
02044 /*
02045  * Free a saml named id object
02046  * @param named_id named_id to be freed
02047  * @param env pointer to environment struct
02048  */
02049 AXIS2_EXTERN void AXIS2_CALL 
02050 saml_named_id_free(saml_named_id_t *named_id, const axutil_env_t *env);
02051 
02052 /*
02053  * Build a saml named id from an om node containing a saml named identifier
02054  * @param named_id named id object
02055  * @param node om node containing the saml named identifier
02056  * @param env pointer to environment struct
02057  */
02058 AXIS2_EXTERN int AXIS2_CALL 
02059 saml_named_id_build(saml_named_id_t *named_id, axiom_node_t *node, 
02060                                         const axutil_env_t *env);
02061 
02062 /*
02063  * Serialize a named id object in to an om node.
02064  * @param named_id named id object
02065  * @param parent if specified this will be the parent of the newely created node
02066  * @param env pointer to environment struct
02067  */
02068 AXIS2_EXTERN axiom_node_t * AXIS2_CALL 
02069 saml_named_id_to_om(saml_named_id_t *id, axiom_node_t *parent, 
02070                                         const axutil_env_t *env);
02071 
02072 /* 
02073  * Get the name of the named identifier.
02074  * @param named_id named id object
02075  * @param env pointer to environment struct
02076  * @return name as a string
02077  */
02078 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
02079 saml_named_id_get_name(saml_named_id_t *id, const axutil_env_t *env);
02080 
02081 /*
02082  * Get a URI reference representing the format in which the <NameIdentifier> 
02083  * information is provided.
02084  * @param named_id named id object
02085  * @param env pointer to environment struct
02086  * @return format as a URI string
02087  */
02088 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
02089 saml_named_id_get_format(saml_named_id_t *id, const axutil_env_t *env);
02090 
02091 /*
02092  * Get the security or administrative domain that qualifies the name of the 
02093  * subject.
02094  * @param named_id named id object
02095  * @param env pointer to environment struct
02096  * @return string representing the domain
02097  */
02098 AXIS2_EXTERN axis2_char_t * AXIS2_CALL 
02099 saml_named_id_get_name_qualifier(saml_named_id_t *id, const axutil_env_t *env);
02100 
02101 /* 
02102  * Set the name of the named identifier.
02103  * @param named_id named id object
02104  * @param env pointer to environment struct
02105  * @param name name as a string
02106  */
02107 AXIS2_EXTERN int AXIS2_CALL 
02108 saml_named_id_set_name(saml_named_id_t *id, 
02109                                            const axutil_env_t *env, axis2_char_t *name);
02110 
02111 /*
02112  * Set a URI reference representing the format in which the <NameIdentifier> 
02113  * information is provided.
02114  * @param named_id named id object
02115  * @param env pointer to environment struct
02116  * @param format format of the nameidentifier
02117  */
02118 AXIS2_EXTERN int AXIS2_CALL 
02119 saml_named_id_set_format(saml_named_id_t *id, 
02120                                                  const axutil_env_t *env, axis2_char_t *format);
02121 
02122 /*
02123  * Set the security or administrative domain that qualifies the name of the 
02124  * subject.
02125  * @param named_id named id object
02126  * @param env pointer to environment struct
02127  * @param qualifier string representing the domain 
02128  */
02129 AXIS2_EXTERN int AXIS2_CALL 
02130 saml_named_id_set_name_qualifier(saml_named_id_t *id, 
02131                                                                  const axutil_env_t *env, axis2_char_t *qualifier);
02132 
02133 
02134 /* private method */
02135 AXIS2_EXTERN int AXIS2_CALL saml_util_set_sig_ctx_defaults(oxs_sign_ctx_t *sig_ctx, const axutil_env_t *env, axis2_char_t *id);
02136 
02137 /* Get the session key from a assertion. Session key is inside the SAML 
02138  * token as an EncryptedKey 
02139  * @param env pointer to environment struct
02140  * @param assertion an saml assertion node
02141  * @param pvt_key private key used to encrypt the session key
02142  */
02143 AXIS2_EXTERN oxs_key_t * AXIS2_CALL
02144 saml_assertion_get_session_key(const axutil_env_t *env, axiom_node_t *assertion, 
02145                                openssl_pkey_t *pvt_key);
02146 
02147 #ifdef __cplusplus
02148 }
02149 #endif
02150 
02151 
02152 #endif 

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