Commit Graph

24 Commits

Author SHA1 Message Date
Benjamin Dauvergne 7231771856 All: Rework include files handling, separated ID-WSF code from SAML2/ID-FF code
* nearly all C files: change includes for relative paths.
 * lasso/id-wsf/id_wsf.h, lasso/id-wsf-2.0/id_wsf_2.h: add top level
   public include files for ID-WSF 1.0 and ID-WSF 2.0.
 * lasso/id-ff/server.*, lasso/id-ff/session.*, lasso/id-ff/identity.*:
   remove most of the code related to ID-WSF and push into
   lasso/id-wsf/id_ff_extensions.* and lasso/id-wsf-2.0/identity.c,
   lasso/id-wsf-2.0/server.c, lasso/id-wsf-2.0/session.c.
 * lasso/id-wsf-2.0/saml2_login.c,
   lasso/id-wsf-2.0/saml2_login_private.h: same change but for ID-WSF
   2.0 support in SAML2 SSO profile.
2009-08-26 15:14:32 +00:00
Benjamin Dauvergne 55f2051534 ID-WSF: Lots of modifications
Migrate lots of code to use new utility macros. Try to simplify most
 code paths or to factorize with LassoWsfProfile.

 * lasso/id-wsf/wsf_profile.c:
   Add API:
    - lasso_wsf_profile_build_soap_response_msg to build SOAP fault for
      Lasso errors,
    - lasso_wsf_profile_set_msg_url_from_description, to set the
      destination URL using the chosen LassoDiscoDescription (with
      respect to the security mechanism),
    - lasso_wsf_profile_init_soap_response to initialize a response to
      the current request, to use in sub classes,
    - lasso_wsf_profile_get_remote_provider_id, retrieve the SOAP
      binding corresponding information,
    - lasso_wsf_profile_get_remote_provider, simplification of
      lasso_wsf_profile_get_remote_provider_id,
    - lasso_wsf_profile_get_soap_fault, retrieve the last setted SOAP
      fault, used by sub classes,
    - lasso_wsf_profile_set_soap_fault, set a SOAP fault, to be returned
      by the next call by lasso_wsf_profile_build_soap_response_msg, to
      use in sub classes,
    - lasso_wsf_profile_set/get_status_code, set/get the stored status
      code, to use in the next lasso_xxx_build_response_message, to use
      in sub classes.
   Change name lasso_wsf_profile_get_description_autos to
   lasso_wsf_profile_get_description_auto.
   Do not access directly the session is_dirty field (it has been
   sealed).

 * lasso/id-wsf/wsf_profile.h:
   Add helper macro lasso_wsf_profile_helper_set_status to set status
   code of an ID-WSF response message containing a Status element using
   the stored status code.
 * lasso/id-wsf/wsf_profile_private.h:
   Add new fields (moved public fields).
   Add lasso_wsf_profile_set_msg_url_from_description,
   lasso_wsf_profile_build_soap_fault_response_msg.
 * lasso/id-wsf/data_service_private.h:
   Remove file.
 * lasso/id-wsf/data_service.h: Remove all public fields.
 * lasso/id-wsf/data_service.c:
   Remove private structure. Use the equivalents LassoWsfProfile private
   fields. Update documentation. Use LassoWsfProfile generic functions
   for initializing requests. Add API lasso_data_service_get_query_item,
   lasso_data_service_get_answers, lasso_data_service_get_answer,
   lasso_data_service_get_answers_by_select,
   lasso_data_service_get_answer_for_item_id,
   lasso_data_service_add_modification.
   Remove lasso_data_service_need_redirect_user use equivalent function
   lasso_interaction_profile_service_build_redirect_response_msg. Remove
   lasso_data_service_get_resource_offering,
   lasso_data_service_set_offering.
 * lasso/id-wsf/discovery.c:
   Add documentation. Change some signatures. Remove
   lasso_discovery_get_description_auto. Change name of
   lasso_discovery_init_insert to lasso_discovery_init_modify. Add a
   generic lasso_discovery_process_request_msg.
   Add internal function lasso_discovery_init_offering, to get
   automatically an offering if possible. Remove useless init_from_xml.
   Rework lasso_discovery_build_credential implementation.
   overloading. Remove lasso_discovery_destroy.
 * lasso/id-wsf/discovery.h:
   Remove lasso_discovery_destroy.
 * lasso/id-wsf/interaction_profile_service.c:
   Add lasso_interaction_profile_service_build_redirect_response_msg.
 * lasso/id-wsf/personal_profile_service.c:
   Update lasso_personal_profile_service_get_email to use
   lasso_data_service_get_answers_by_select.
 * lasso/xml/dst_modify.c:
   make modification parameter optional to the constructor.
2009-08-26 15:13:46 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Benjamin Dauvergne 207891ff29 * Fix blanks mismatch (space in *.c and *h files or tabs in *.py files) and formatting 2008-08-05 14:53:29 +00:00
Benjamin Dauvergne 2310313cb1 * lasso/id-wsf/wsf_profile.c,wsf_profile.h,wsf_profile_private.h: add const modifier to signature when possible 2008-08-01 14:10:29 +00:00
Benjamin Dauvergne 76d9fce5d5 forked lasso branch for adeline 2008-08-01 14:08:54 +00:00
Benjamin Dauvergne bbd7e083b2 * lasso/id-wsf/discovery.c:
- include utils.h
 - move lasso_wsf_profile_build_key_info_node here
 - add a comment for future review of lasso_discovery_build_credential
 - remove direct use of lasso_wsf_profile_build_soap_envelope, use
   lasso_wsf_profile_init_soap_request instead.

* lasso/id-wsf/utils.{c,h}:
 - new file with security mech id matching functions

* lasso/id-wsf/wsf_profile.c:
 - remove all credentials related static functions
 - empty all credentials related public functions
 - move function related to matching security mechanism into utils.{c,h} and
   xml/disco_description.h
 - add static function lasso_wsf_profile_comply_with_saml_authentication that
   tries to add credential to the request to a web service using the SAML
   WS-Security mechanism
 - add static function lasso_wsf_profile_comply_with_security_mechanism to
   dispatch upon the current chosen securirt mechanism.
 - extract build_soap_envelope to the static function
   build_soap_envelope_internal to remove warning of usage of a deprecated
   function.
 - remove lasso_wsf_profile_set_public_key
 - remove lasso_wsf_profile_set_security_mech_id
 - add lasso_wsf_profile_get_security_mechanism
 - add lasso_wsf_profile_set_description
 - empty function about online status of the principal
 - remove all (non-working) handling of the x509 security mechanism
 - add a new constructor function
 LassoWsfProfile* lasso_wsf_profile_new_full(LassoServer *server, LassoDiscoResourceOffering *offering)
 - and a new init function (for subclass):
 gint lasso_wsf_profile_init(LassoWsfProfile *profile, LassoServer *server, LassoDiscoResourceOffering *offering)

* lasso/id-wsf/wsf_profile.h:
 - mark as deprecated:
 lasso_wsf_profile_move_credentials
 lasso_wsf_profile_build_soap_envelope
 lasso_wsf_profile_set_provider_soap_request
 lasso_wsf_profile_principal_is_online
 lasso_wsf_profile_add_credential
 lasso_wsf_profile_set_principal_status
 lasso_wsf_profile_set_principal_online
 lasso_wsf_profile_set_principal_offline

* lasso/id-wsf/wsf_profile_private.h:
 - remove fields from LassoWsfProfilePrivate structure:
  - GList *credentials;
  - gchar *public_key;
 - add fields:
  - char *security_mech_id;
  - LassoDiscoResourceOffering *offering;
2008-08-01 14:08:41 +00:00
Benjamin Dauvergne 5b7f491851 Add disco_description in includes 2008-08-01 14:08:09 +00:00
Benjamin Dauvergne 376dcdd724 add new method lasso_wsf_profile_set_description_from_offering 2008-08-01 14:07:24 +00:00
Benjamin Dauvergne 1be04df84e Add disco_declaration.h to imported headers 2008-05-26 22:58:18 +00:00
Damien Laniel 4fc6657e0c updated Copyright dates in all files 2007-05-30 17:17:45 +00:00
Frédéric Péters 011bc44569 random fixage of warning displayed with -Wall 2006-11-14 17:07:31 +00:00
Nicolas Clapies c26a127319 *** empty log message *** 2005-12-06 13:15:31 +00:00
Nicolas Clapies 57baac4a4c Added support of principal state : now it is possible a SP informs an AP if principal is considered to be online or not. To tell principal is online, just add a call to lasso_wsf_profile_set_principal_online() after lasso_data_service_init_query(), and offline a call to lasso_wsf_profile_set_principal_offline(). At AP, to known if principal is to be considered online just test if lasso_wsf_profile_principal_is_online() returns TRUE or FALSE. 2005-10-06 13:42:54 +00:00
Nicolas Clapies 93a99e8034 If a service found in server object, retrieve needed description depending on an optional security mechanism id.lasso/id-wsf/data_service.c 2005-09-30 09:01:49 +00:00
Nicolas Clapies 331dd328d5 Added X509 authentication mecanism. 2005-09-27 07:57:35 +00:00
Nicolas Clapies 3153eb8591 First attempt to implement authentication security mechanism. Only SAML is implemented and it needs improvement. 2005-09-19 14:40:51 +00:00
Frédéric Péters c848b6b6f7 added session and identity to LassoWsfProfile, much like LassoProfile. Exposed
them via SWIG inherited into LassoDiscovery object
2005-08-08 11:31:17 +00:00
Nicolas Clapies 97618e56e2 Added WSF SOAP binding layer. 2005-05-16 13:25:57 +00:00
Nicolas Clapies f059e31e12 Added function to build generic liberty wsf soap envelope. 2005-03-21 13:14:26 +00:00
Nicolas Clapies 16d1224122 Added soap envelope object to embed specific data from id-wsf.lasso/id-wsf/authentication.c 2005-03-02 08:24:59 +00:00
Emmanuel Raviart 7a03e99b09 Updated Copyright and authors. 2005-01-22 15:57:56 +00:00
Nicolas Clapies 64e6685ae2 Updated lasso_wsf_profile_build_*_msg() : now they only set msg_body class's attribute with a soap message (request / response). 2004-12-10 14:14:12 +00:00
Nicolas Clapies e067ba2ae7 Added a first support of id-wsf high level. Only the base class is defined : LassoWsfProfile is intended to be inherited by future service classes. It is still very incomplete. 2004-11-30 17:07:42 +00:00