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

Generated on Thu May 22 15:02:56 2008 for Rampart/C by  doxygen 1.5.5