Remove ID-WSF 1.0, 2.0 and WS-* support (#56644)
It has been deprecated for a long time.
This commit is contained in:
parent
d4ccf15902
commit
4a880977d1
|
@ -268,8 +268,6 @@ class Function:
|
|||
skip = func.attrib.get('skip')
|
||||
if skip == 'true':
|
||||
self.skip = True
|
||||
elif skip == 'unless-id-wsf' and not binding.options.idwsf:
|
||||
self.skip = True
|
||||
elif binding.options.language in skip.split(','):
|
||||
self.skip = True
|
||||
if func.attrib.get('return_type_qualifier'):
|
||||
|
@ -558,18 +556,10 @@ def parse_header(header_file):
|
|||
|
||||
|
||||
def parse_headers(srcdir):
|
||||
wsf_prefixes = ['disco_', 'dst_', 'is_', 'profile_service_', 'discovery_',
|
||||
'wsf_', 'interaction_', 'utility_', 'sa_', 'authentication_',
|
||||
'wsse_', 'sec_', 'idwsf2_', 'wsf2_', 'wsa_', 'wsu', 'soap_binding']
|
||||
|
||||
srcdir = os.path.abspath(srcdir)
|
||||
parentdir = os.path.dirname(srcdir)
|
||||
|
||||
exclusion = ('xml_idff.h', 'xml_idwsf.h', 'xml_saml2.h', \
|
||||
'xml_idwsf2.h', 'xml_soap11.h',
|
||||
'lasso_config.h', 'saml2_xsd.h' )
|
||||
if not binding.options.idwsf:
|
||||
exclusion += ( 'idwsf_strings.h', )
|
||||
exclusion = ('xml_idff.h', 'xml_saml2.h', 'xml_soap11.h', 'lasso_config.h', 'saml2_xsd.h' )
|
||||
for base, dirnames, filenames in os.walk(srcdir):
|
||||
dirnames.sort()
|
||||
filenames.sort()
|
||||
|
@ -580,10 +570,6 @@ def parse_headers(srcdir):
|
|||
if not 'Makefile.am' in filenames:
|
||||
# not a source dir
|
||||
continue
|
||||
if not binding.options.idwsf and (bname == 'id-wsf' or \
|
||||
bname == 'id-wsf-2.0' or bname == 'ws'):
|
||||
# ignore ID-WSF
|
||||
continue
|
||||
makefile_am = open(os.path.join(base, 'Makefile.am')).read()
|
||||
filenames = [x for x in filenames if x.endswith('.h') if x in makefile_am]
|
||||
for filename in filenames:
|
||||
|
@ -591,15 +577,11 @@ def parse_headers(srcdir):
|
|||
continue
|
||||
if 'private' in filename:
|
||||
continue
|
||||
if not binding.options.idwsf:
|
||||
if True in (filename.startswith(wsf_prefix) for wsf_prefix in wsf_prefixes):
|
||||
continue
|
||||
header_path = os.path.join(base, filename)
|
||||
header_relpath = os.path.relpath(header_path, parentdir)
|
||||
|
||||
binding.headers.append(header_relpath)
|
||||
parse_header(header_path)
|
||||
binding.constants.append(('b', 'LASSO_WSF_ENABLED'))
|
||||
|
||||
def main():
|
||||
global binding
|
||||
|
@ -607,7 +589,6 @@ def main():
|
|||
parser = OptionParser()
|
||||
parser.add_option('-l', '--language', dest = 'language')
|
||||
parser.add_option('-s', '--src-dir', dest = 'srcdir', default = '../lasso/')
|
||||
parser.add_option('--enable-id-wsf', dest = 'idwsf', action = 'store_true')
|
||||
parser.add_option('--enable-exception-docs', dest= 'exception_doc', action = 'store_true')
|
||||
|
||||
options, args = parser.parse_args()
|
||||
|
|
|
@ -28,10 +28,6 @@ endif
|
|||
java_extension_LTLIBRARIES = libjnilasso.la
|
||||
java_extensiondir = ${libdir}/java
|
||||
|
||||
if WSF_ENABLED
|
||||
EXTRA_ARGS = --enable-id-wsf
|
||||
endif
|
||||
|
||||
java_lasso_source_files := $(shell $(PYTHON) $(top_srcdir)/bindings/bindings.py -l java-list --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS) )
|
||||
|
||||
lasso_jardir=$(prefix)/share/java
|
||||
|
|
|
@ -34,17 +34,6 @@
|
|||
rename="lasso_profile_has_dirty_identity"/>
|
||||
<func name="lasso_profile_is_session_dirty"
|
||||
rename="lasso_profile_has_dirty_session"/>
|
||||
<!-- LassoWsfProfile -->
|
||||
<func name="lasso_wsf_profile_get_identity" return_owner="false" />
|
||||
<func name="lasso_wsf_profile_get_session" return_owner="false" />
|
||||
<func name="lasso_wsf_profile_get_remote_provider" skip="java,perl"/>
|
||||
<func name="lasso_data_service_get_answer" skip="java,perl"/>
|
||||
<func name="lasso_data_service_get_query_item" skip="java,perl"/>
|
||||
<func name="lasso_data_service_add_modification" skip="java,perl"/>
|
||||
<func name="lasso_data_service_get_answers" skip="java,perl"/>
|
||||
<func name="lasso_data_service_get_answers_by_select" skip="java,perl"/>
|
||||
<func name="lasso_data_service_get_answers_by_item_id" skip="java,perl"/>
|
||||
<func name="lasso_saml2_encrypted_element_decrypt" skip="true"/>
|
||||
<!-- LassoIdentity -->
|
||||
<func name="lasso_identity_get_federation" return_owner="false" />
|
||||
<func name="lasso_identity_get_svc_md_ids" return_type_qualifier="char*"/>
|
||||
|
@ -164,8 +153,6 @@
|
|||
<param name="service_type" optional="true"/>
|
||||
</func>
|
||||
<func name="lasso_discovery_get_description_auto" return_owner="false"/>
|
||||
<func name="lasso_server_get_service" skip="unless-id-wsf" />
|
||||
<func name="lasso_login_set_encryptedResourceId" skip="unless-id-wsf"/>
|
||||
<func name="lasso_node_new_from_dump" skip="java"/>
|
||||
<func name="lasso_node_new_from_soap" skip="java"/>
|
||||
<func name="lasso_node_new_from_xmlNode" skip="java"/>
|
||||
|
@ -175,26 +162,6 @@
|
|||
<func name="lasso_server_load_metadata" skip="perl,java" />
|
||||
<!-- IdWsf -->
|
||||
<arg name="abstract" rename="abstract_" language="java"/>
|
||||
<func name="lasso_personal_profile_service_new_full" rename="lasso_personal_profile_server_new_personal_profile_service_full"/>
|
||||
<func name="lasso_wsf_profile_new_full" rename="lasso_wsf_profile_wsf_profile_new_full"/>
|
||||
<func name="lasso_wsa_endpoint_reference_get_target_identity_token" skip="true"/>
|
||||
<func name="lasso_wsa_endpoint_reference_get_security_token" skip="true"/>
|
||||
<func name="lasso_wsa_endpoint_reference_associate_service_to_type" skip="true"/>
|
||||
<func name="lasso_authentication_get_type" skip="true"/>
|
||||
<func name="lasso_authentication_get_type" skip="true"/>
|
||||
<func name="lasso_authentication_new" skip="true"/>
|
||||
<func name="lasso_authentication_destroy" skip="true"/>
|
||||
<func name="lasso_authentication_client_start" skip="true"/>
|
||||
<func name="lasso_authentication_client_step" skip="true"/>
|
||||
<func name="lasso_authentication_get_mechanism_list" skip="true"/>
|
||||
<func name="lasso_authentication_init_request" skip="true"/>
|
||||
<func name="lasso_authentication_process_request_msg" skip="true"/>
|
||||
<func name="lasso_authentication_process_response_msg" skip="true"/>
|
||||
<func name="lasso_authentication_server_start" skip="true"/>
|
||||
<func name="lasso_authentication_server_step" skip="true"/>
|
||||
<struct name="LassoAuthentication" skip="true"/>
|
||||
<func name="lasso_wsse_username_token_derive_key" skip="true"/>
|
||||
<func name="lasso_wsa_endpoint_reference_add_security_token" skip="true"/>
|
||||
<func name="lasso_log_set_handler" skip="true"/>
|
||||
<func name="lasso_log_remove_handler" skip="true"/>
|
||||
<func name="lasso_key_new_for_signature_from_memory" skip="true"/>
|
||||
|
@ -216,9 +183,5 @@
|
|||
<category name="Logout" parent="Profile"/>
|
||||
<category name="Defederation" parent="Profile"/>
|
||||
<category name="NameIdentifierMapping" parent="Profile"/>
|
||||
<category name="WsfProfile" parent="Profile"/>
|
||||
<category name="Discovery" parent="WsfProfile"/>
|
||||
<category name="DataService" parent="WsfProfile"/>
|
||||
<category name="Dst" parent="WsfProfile"/>
|
||||
</exception>
|
||||
</overrides>
|
||||
|
|
|
@ -30,10 +30,6 @@ TOCOPY=gobject_handling.c glist_handling.c ghashtable_handling.c Makefile.PL \
|
|||
|
||||
EXTRA_DIST=$(TOCOPY) typemap-in typemap-out lang.py __init__.py test.sh
|
||||
|
||||
if WSF_ENABLED
|
||||
EXTRA_ARGS = --enable-id-wsf
|
||||
endif
|
||||
|
||||
# Copy if out of a build
|
||||
Makefile.perl: $(srcdir)/Makefile.PL Lasso.xs Lasso.pm
|
||||
$(AM_V_GEN) if [ "$(srcdir)" != "$(builddir)" ]; then \
|
||||
|
|
|
@ -208,7 +208,7 @@ INCLUDE: LassoNode.xs
|
|||
self.xs.pn('sv_setiv(ct, %s);' % name)
|
||||
elif type == 's':
|
||||
self.xs.pn('sv_setpv(ct, %s);' % name)
|
||||
elif type == 'b': # only one case LASSO_WSF_ENABLED
|
||||
elif type == 'b':
|
||||
self.xs.unindent()
|
||||
self.xs.pn('''#ifdef %s
|
||||
sv_setiv(ct, 1);
|
||||
|
@ -224,7 +224,7 @@ INCLUDE: LassoNode.xs
|
|||
self.xs.pn('ct = newSViv(%s);' % name)
|
||||
elif type == 's':
|
||||
self.xs.pn('ct = newSVpv((char*)%s, 0);' % name)
|
||||
elif type == 'b': # only one case LASSO_WSF_ENABLED
|
||||
elif type == 'b':
|
||||
self.xs.unindent()
|
||||
self.xs.pn('''#ifdef %s
|
||||
ct = newSViv(1);
|
||||
|
|
|
@ -24,11 +24,6 @@ nodist_lasso_la_SOURCES = _lasso.c
|
|||
|
||||
BUILT_SOURCES = _lasso.c
|
||||
|
||||
if WSF_ENABLED
|
||||
EXTRA_ARGS = --enable-id-wsf
|
||||
endif
|
||||
|
||||
|
||||
lasso.php _lasso.c: lang.py wrapper_source.py wrapper_header.py wrapper_source_top.c php_code.py ../overrides.xml
|
||||
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/bindings/bindings.py -l php5 --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS)
|
||||
|
||||
|
|
|
@ -98,9 +98,6 @@ function lassoGetRequestTypeFromSoapMsg($mesg) {
|
|||
return lasso_get_request_type_from_soap_msg($mesg);
|
||||
}
|
||||
|
||||
function lassoRegisterIdWsf2DstService($prefix, $href) {
|
||||
lasso_register_idwsf2_dst_service($prefix, $href);
|
||||
}
|
||||
''', file=self.fd)
|
||||
|
||||
def generate_class(self, klass):
|
||||
|
|
|
@ -24,11 +24,6 @@ nodist_lasso_la_SOURCES = _lasso.c
|
|||
|
||||
BUILT_SOURCES = _lasso.c
|
||||
|
||||
if WSF_ENABLED
|
||||
EXTRA_ARGS = --enable-id-wsf
|
||||
endif
|
||||
|
||||
|
||||
lasso.php _lasso.c: lang.py wrapper_source.py wrapper_header.py wrapper_source_top.c php_code.py ../overrides.xml
|
||||
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/bindings/bindings.py -l php7 --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS)
|
||||
|
||||
|
|
|
@ -97,10 +97,6 @@ function cptrToPhp ($cptr) {
|
|||
function lassoGetRequestTypeFromSoapMsg($mesg) {
|
||||
return lasso_get_request_type_from_soap_msg($mesg);
|
||||
}
|
||||
|
||||
function lassoRegisterIdWsf2DstService($prefix, $href) {
|
||||
lasso_register_idwsf2_dst_service($prefix, $href);
|
||||
}
|
||||
''', file=self.fd)
|
||||
|
||||
def generate_class(self, klass):
|
||||
|
|
|
@ -32,10 +32,6 @@ _lasso.c lasso.py: $(top_srcdir)/lasso/*.h $(top_srcdir)/lasso/*.c $(top_srcdir)
|
|||
|
||||
EXTRA_DIST=lang.py wrapper_bottom.c wrapper_top.c __init__.py examples
|
||||
|
||||
if WSF_ENABLED
|
||||
EXTRA_ARGS = --enable-id-wsf
|
||||
endif
|
||||
|
||||
lasso.py _lasso.c: lang.py wrapper_top.c wrapper_bottom.c ../bindings.py
|
||||
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/bindings/bindings.py -l python --src-dir=$(top_srcdir)/lasso/ $(EXTRA_ARGS)
|
||||
|
||||
|
|
|
@ -270,8 +270,6 @@ import lasso
|
|||
|
||||
# backward compatibility with the SWIG binding
|
||||
|
||||
WSF_SUPPORT = WSF_ENABLED
|
||||
|
||||
Profile.isIdentityDirty = property(Profile.hasDirtyIdentity)
|
||||
Profile.isSessionDirty = property(Profile.hasDirtySession)
|
||||
|
||||
|
@ -303,15 +301,6 @@ MiscTextNode.text_child = MiscTextNode.textChild
|
|||
NodeList = list
|
||||
StringList = list
|
||||
StringDict = dict
|
||||
registerIdWsf2DstService = registerIdwsf2DstService
|
||||
|
||||
if WSF_SUPPORT:
|
||||
DiscoDescription_newWithBriefSoapHttpDescription = DiscoDescription.newWithBriefSoapHttpDescription
|
||||
Discovery.buildRequestMsg = Discovery.buildSoapRequestMsg
|
||||
InteractionProfileService.buildRequestMsg = InteractionProfileService.buildSoapRequestMsg
|
||||
InteractionProfileService.buildResponseMsg = InteractionProfileService.buildSoapResponseMsg
|
||||
DataService.buildRequestMsg = DataService.buildSoapRequestMsg
|
||||
DiscoModifyResponse.newEntryIds = DiscoModifyResponse.newEntryIDs
|
||||
''', file=fd)
|
||||
|
||||
def generate_constants(self, fd):
|
||||
|
|
|
@ -7,12 +7,7 @@ if PYTHON_ENABLED
|
|||
TESTS += profiles_tests.py binding_tests.py
|
||||
endif
|
||||
|
||||
if WSF_ENABLED
|
||||
TESTS += idwsf1_tests.py idwsf2_tests.py
|
||||
endif
|
||||
|
||||
TEST_EXTENSIONS = .py
|
||||
PY_LOG_COMPILER = $(PYTHON)
|
||||
|
||||
EXTRA_DIST = profiles_tests.py binding_tests.py idwsf1_tests.py idwsf2_tests.py \
|
||||
tests.py XmlTestRunner.py
|
||||
EXTRA_DIST = profiles_tests.py binding_tests.py tests.py XmlTestRunner.py
|
||||
|
|
|
@ -1,796 +0,0 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# $Id: idwsf2_tests.py 3254 2007-06-05 21:23:57Z dlaniel $
|
||||
#
|
||||
# Python unit tests for Lasso library
|
||||
#
|
||||
# Copyright (C) 2004-2007 Entr'ouvert
|
||||
# http://lasso.entrouvert.org
|
||||
#
|
||||
# Authors: See AUTHORS file in top-level directory.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import os
|
||||
import unittest
|
||||
import sys
|
||||
from six import StringIO
|
||||
import logging
|
||||
|
||||
logging.basicConfig()
|
||||
|
||||
if not '..' in sys.path:
|
||||
sys.path.insert(0, '..')
|
||||
if not '../.libs' in sys.path:
|
||||
sys.path.insert(0, '../.libs')
|
||||
|
||||
import lasso
|
||||
|
||||
try:
|
||||
import lxml.etree as ET
|
||||
except ImportError:
|
||||
try:
|
||||
import elementtree.ElementTree as ET
|
||||
except ImportError:
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
try:
|
||||
dataDir
|
||||
except NameError:
|
||||
dataDir = os.path.join(os.environ['TOP_SRCDIR'], 'tests', 'data')
|
||||
|
||||
idpSoapEndpoint = 'http://idp1/soapEndpoint'
|
||||
spSoapEndpoint = 'http://sp1/soapEndpoint'
|
||||
spInteractionUrl = 'http://sp1/askMeAQuestion'
|
||||
|
||||
class IdWsf2TestCase(unittest.TestCase):
|
||||
def getWspServer(self):
|
||||
wsp_metadata = os.path.join(dataDir, 'sp5-saml2/metadata.xml')
|
||||
wsp_private_key = os.path.join(dataDir, 'sp5-saml2/private-key.pem')
|
||||
idp_metadata = os.path.join(dataDir, 'idp5-saml2/metadata.xml')
|
||||
|
||||
server = lasso.Server(wsp_metadata, wsp_private_key, None, None)
|
||||
server.role = lasso.PROVIDER_ROLE_SP
|
||||
server.addProvider(lasso.PROVIDER_ROLE_IDP, idp_metadata, None, None)
|
||||
server.setEncryptionPrivateKey(wsp_private_key);
|
||||
|
||||
return server;
|
||||
|
||||
def getWscServer(self):
|
||||
wsc_metadata = os.path.join(dataDir, 'sp6-saml2/metadata.xml')
|
||||
wsc_private_key = os.path.join(dataDir, 'sp6-saml2/private-key.pem')
|
||||
idp_metadata = os.path.join(dataDir, 'idp5-saml2/metadata.xml')
|
||||
|
||||
server = lasso.Server(wsc_metadata, wsc_private_key, None, None)
|
||||
server.role = lasso.PROVIDER_ROLE_SP
|
||||
server.addProvider(lasso.PROVIDER_ROLE_IDP, idp_metadata, None, None)
|
||||
|
||||
return server;
|
||||
|
||||
def getIdpServer(self):
|
||||
if hasattr(self, 'idp_server_dump') and self.idp_server_dump is not None:
|
||||
server = lasso.Server.newFromDump(self.idp_server_dump)
|
||||
server.role = lasso.PROVIDER_ROLE_IDP
|
||||
else:
|
||||
idp_metadata = os.path.join(dataDir, 'idp5-saml2/metadata.xml')
|
||||
idp_private_key = os.path.join(dataDir, 'idp5-saml2/private-key.pem')
|
||||
wsp_metadata = os.path.join(dataDir, 'sp5-saml2/metadata.xml')
|
||||
wsc_metadata = os.path.join(dataDir, 'sp6-saml2/metadata.xml')
|
||||
|
||||
server = lasso.Server(idp_metadata, idp_private_key, None, None)
|
||||
server.role = lasso.PROVIDER_ROLE_IDP
|
||||
server.addProvider(lasso.PROVIDER_ROLE_SP, wsp_metadata, None, None)
|
||||
server.getProvider(server.providerIds[0]).setEncryptionMode(lasso.ENCRYPTION_MODE_NAMEID);
|
||||
server.addProvider(lasso.PROVIDER_ROLE_SP, wsc_metadata, None, None)
|
||||
self.idp_server_dump = server.dump()
|
||||
|
||||
return server
|
||||
|
||||
def query(self, wsc, idp, idp_identity_dump, wsc_session_dump, uid, federations, services_map, service_associations, provider_ids = None, service_types = None, options = None, actions = None):
|
||||
session = lasso.Session.newFromDump(wsc_session_dump)
|
||||
assertion = session.getAssertion(idp.providerId)
|
||||
self.failUnless(assertion is not None)
|
||||
epr = assertion.idwsf2GetDiscoveryBootstrapEpr()
|
||||
self.failUnless(epr is not None)
|
||||
wsc_disco = lasso.IdWsf2Discovery(wsc)
|
||||
wsc_disco.setEpr(epr)
|
||||
wsc_disco.initQuery()
|
||||
wsc_disco.addRequestedService(service_types = service_types, provider_ids = provider_ids, options = options, actions = actions)
|
||||
wsc_disco.buildRequestMsg()
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.setIdentityFromDump(idp_identity_dump)
|
||||
idp_disco.processRequestMsg(wsc_disco.msgBody)
|
||||
f = self.nid2tuple(idp_disco.getNameIdentifier())
|
||||
uid = federations[f]
|
||||
for id in service_associations[uid]:
|
||||
idp_disco.addServiceMetadata(services_map[id])
|
||||
idp_disco.validateRequest()
|
||||
idp_disco.buildResponseMsg()
|
||||
wsc_disco.processResponseMsg(idp_disco.msgBody)
|
||||
return wsc_disco.endpointReferences
|
||||
|
||||
|
||||
|
||||
def metadataRegister(self, wsp, idp, session_dump, abstract = None, address = None, provider_id = None, service_types = None, services_map = None):
|
||||
session = lasso.Session.newFromDump(session_dump)
|
||||
assertion = session.getAssertion(idp.providerId)
|
||||
self.failUnless(assertion is not None)
|
||||
epr = assertion.idwsf2GetDiscoveryBootstrapEpr()
|
||||
self.failUnless(epr is not None)
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(epr)
|
||||
abstract = 'Personal Profile service'
|
||||
self.failUnless(abstract is not None)
|
||||
self.failUnless(address is not None)
|
||||
self.failUnless(service_types is not None)
|
||||
self.failUnless(isinstance(services_map, dict))
|
||||
wsp_disco.initMetadataRegister()
|
||||
if not provider_id:
|
||||
provider_id = wsp.providerId
|
||||
wsp_disco.addSimpleServiceMetadata(
|
||||
service_types = service_types,
|
||||
abstract = abstract, provider_id = provider_id,
|
||||
address = address,
|
||||
security_mechanisms = (lasso.SECURITY_MECH_BEARER,))
|
||||
wsp_disco.buildRequestMsg()
|
||||
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
idp_disco.checkSecurityMechanism()
|
||||
idp_disco.validateRequest()
|
||||
self.failUnlessEqual(len(idp_disco.metadatas), 1)
|
||||
# add metadatas to directory
|
||||
sender = idp_disco.getSoapEnvelopeRequest().sb2GetProviderId()
|
||||
self.failUnless(sender is not None)
|
||||
metadatas = services_map.get(sender, [])
|
||||
for metadata in idp_disco.metadatas:
|
||||
services_map[metadata.svcMDID] = metadata
|
||||
metadatas.append(metadata.svcMDID)
|
||||
services_map[sender] = metadatas
|
||||
idp_disco.buildResponseMsg()
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
self.failUnlessEqual(len(wsp_disco.metadatas), 1)
|
||||
self.failUnlessEqual(wsp_disco.metadatas[0].svcMDID, wsp_disco.response.svcMDID[0])
|
||||
return wsp_disco.metadatas[0].svcMDID
|
||||
|
||||
def nid2tuple(self, nid):
|
||||
return (nid.nameQualifier, nid.format, nid.sPNameQualifier, nid.content)
|
||||
|
||||
def addAssociation(self, wsp, idp, session_dump, svcmdid, service_maps, federations, service_associations):
|
||||
self.failUnless(isinstance(service_associations, dict))
|
||||
self.failUnless(isinstance(service_maps, dict))
|
||||
# Get the bootstrap
|
||||
session = lasso.Session.newFromDump(session_dump)
|
||||
assertion = session.getAssertion(idp.providerId)
|
||||
self.failUnless(assertion is not None)
|
||||
epr = assertion.idwsf2GetDiscoveryBootstrapEpr()
|
||||
self.failUnless(epr is not None)
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(epr)
|
||||
wsp_disco.initMetadataAssociationAdd()
|
||||
wsp_disco.svcmdids = (svcmdid,)
|
||||
wsp_disco.buildRequestMsg()
|
||||
# Handle request
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
idp_disco.checkSecurityMechanism()
|
||||
self.failUnlessEqual(idp_disco.svcmdids, (svcmdid,))
|
||||
sender = idp_disco.getSoapEnvelopeRequest().sb2GetProviderId()
|
||||
name_identifier = idp_disco.getNameIdentifier()
|
||||
f = self.nid2tuple(name_identifier)
|
||||
uid = federations[f]
|
||||
l = service_associations.get(uid, [])
|
||||
for id in idp_disco.svcmdids:
|
||||
# check it exists
|
||||
self.failUnless(service_maps.get(id) is not None)
|
||||
# create association
|
||||
if id not in l:
|
||||
l.append(id)
|
||||
service_associations[uid] = l
|
||||
idp_disco.validateRequest()
|
||||
idp_disco.buildResponseMsg()
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
|
||||
def login(self, sp, idp, user_id, federations, sp_identity_dump=None, sp_session_dump=None,
|
||||
idp_identity_dump=None, idp_session_dump=None):
|
||||
sp_login = lasso.Login(sp)
|
||||
idp_provider_id = 'http://idp5/metadata'
|
||||
sp_login.initAuthnRequest(idp_provider_id, lasso.HTTP_METHOD_REDIRECT)
|
||||
sp_login.request.nameIDPolicy.format = lasso.SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT
|
||||
sp_login.request.nameIDPolicy.allowCreate = True
|
||||
sp_login.buildAuthnRequestMsg()
|
||||
|
||||
idp_login = lasso.Login(idp)
|
||||
query = sp_login.msgUrl.split('?')[1]
|
||||
if idp_identity_dump is not None:
|
||||
idp_login.setIdentityFromDump(idp_identity_dump)
|
||||
if idp_session_dump is not None:
|
||||
idp_login.setSessionFromDump(idp_session_dump)
|
||||
idp_login.processAuthnRequestMsg(query)
|
||||
idp_login.validateRequestMsg(True, True)
|
||||
idp_login.buildAssertion(lasso.SAML_AUTHENTICATION_METHOD_PASSWORD, None, None, None, None)
|
||||
if idp_login.assertion.subject.encryptedId:
|
||||
f = self.nid2tuple(idp_login.assertion.subject.encryptedId.originalData)
|
||||
else:
|
||||
f = self.nid2tuple(idp_login.assertion.subject.nameId)
|
||||
federations[f] = user_id
|
||||
l = federations.get(user_id, [])
|
||||
l.append(f)
|
||||
federations[user_id] = l
|
||||
idp_login.idwsf2AddDiscoveryBootstrapEpr(url = idpSoapEndpoint, abstract = 'Discovery Service', security_mechanisms = (lasso.SECURITY_MECH_BEARER,))
|
||||
idp_login.buildArtifactMsg(lasso.HTTP_METHOD_ARTIFACT_GET)
|
||||
artifact_message = idp_login.artifactMessage
|
||||
|
||||
if idp_login.isIdentityDirty:
|
||||
idp_identity_dump = idp_login.identity.dump()
|
||||
if idp_login.isSessionDirty:
|
||||
idp_session_dump = idp_login.session.dump()
|
||||
|
||||
sp_login = lasso.Login(sp)
|
||||
query = idp_login.msgUrl.split('?')[1]
|
||||
query = query.replace("%3D", "=")
|
||||
sp_login.initRequest(query, lasso.HTTP_METHOD_ARTIFACT_GET)
|
||||
sp_login.buildRequestMsg()
|
||||
|
||||
idp_login = lasso.Login(idp)
|
||||
idp_login.processRequestMsg(sp_login.msgBody)
|
||||
idp_login.artifactMessage = artifact_message
|
||||
idp_login.buildResponseMsg(None)
|
||||
|
||||
sp_login.processResponseMsg(idp_login.msgBody)
|
||||
sp_login.acceptSso()
|
||||
if sp_login.isIdentityDirty:
|
||||
sp_identity_dump = sp_login.identity.dump()
|
||||
if sp_login.isSessionDirty:
|
||||
sp_session_dump = sp_login.session.dump()
|
||||
|
||||
return sp_identity_dump, sp_session_dump, idp_identity_dump, idp_session_dump, sp_login.idwsf2GetDiscoveryBootstrapEpr()
|
||||
|
||||
|
||||
class MetadataTestCase(IdWsf2TestCase):
|
||||
def test01(self):
|
||||
"""Test metadata registration on the IdP"""
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, {})
|
||||
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(dst_epr)
|
||||
|
||||
abstract = 'Personal Profile service'
|
||||
wsp_disco.initMetadataRegister()
|
||||
self.failUnless(wsp_disco.request is not None)
|
||||
wsp_disco.addSimpleServiceMetadata(service_types =
|
||||
(lasso.PP11_HREF,), abstract = abstract,
|
||||
provider_id = wsp.providerId, address = spSoapEndpoint,
|
||||
security_mechanisms = (lasso.SECURITY_MECH_BEARER,))
|
||||
self.failUnlessEqual(len(wsp_disco.metadatas), 1)
|
||||
metadata = wsp_disco.metadatas[0]
|
||||
self.failUnlessEqual(metadata.abstract, abstract)
|
||||
self.failUnlessEqual(metadata.providerId, wsp.providerId)
|
||||
self.failUnlessEqual(len(metadata.serviceContext), 1)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].serviceType), 1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].serviceType[0],
|
||||
lasso.PP11_HREF)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].endpointContext), 1)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].address),
|
||||
1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].endpointContext[0].address[0],
|
||||
spSoapEndpoint)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].securityMechId),
|
||||
1)
|
||||
self.failUnlessEqual(
|
||||
metadata.serviceContext[0].endpointContext[0].securityMechId[0],
|
||||
lasso.SECURITY_MECH_BEARER)
|
||||
self.failUnless(metadata.svcMDID is None)
|
||||
wsp_disco.buildRequestMsg()
|
||||
self.failUnlessEqual(wsp_disco.msgUrl, idpSoapEndpoint)
|
||||
self.failUnless(wsp_disco.msgBody is not None)
|
||||
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
self.failUnless(idp_disco is not None)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
self.failUnless(idp_disco.request is not None)
|
||||
self.failUnlessEqual(len(idp_disco.request.svcMD), 1)
|
||||
self.failUnless(idp_disco.request.svcMD[0].svcMDID is None)
|
||||
try:
|
||||
idp_disco.checkSecurityMechanism()
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
try:
|
||||
idp_disco.validateRequest()
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
self.failUnless(idp_disco.response is not None)
|
||||
self.failUnlessEqual(len(idp_disco.metadatas), 1)
|
||||
metadata = idp_disco.metadatas[0]
|
||||
self.failUnlessEqual(metadata.abstract, abstract)
|
||||
self.failUnlessEqual(metadata.providerId, wsp.providerId)
|
||||
self.failUnlessEqual(len(metadata.serviceContext), 1)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].serviceType), 1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].serviceType[0],
|
||||
lasso.PP11_HREF)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].endpointContext), 1)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].address),
|
||||
1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].endpointContext[0].address[0],
|
||||
spSoapEndpoint)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].securityMechId),
|
||||
1)
|
||||
self.failUnlessEqual(
|
||||
metadata.serviceContext[0].endpointContext[0].securityMechId[0],
|
||||
lasso.SECURITY_MECH_BEARER)
|
||||
idp_disco.buildResponseMsg()
|
||||
self.failUnless(metadata.svcMDID is not None)
|
||||
self.failUnless(idp_disco.msgUrl is None)
|
||||
self.failUnless(idp_disco.msgBody is not None)
|
||||
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
|
||||
self.failUnless(len(wsp_disco.metadatas) == 1, 'missing svcMDID')
|
||||
self.failUnless(wsp_disco.metadatas[0].svcMDID, 'missing svcMDID')
|
||||
|
||||
def test02(self):
|
||||
"Test failure by IdP for register request"
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, {})
|
||||
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(dst_epr)
|
||||
|
||||
abstract = 'Personal Profile service'
|
||||
wsp_disco.initMetadataRegister()
|
||||
self.failUnless(wsp_disco.request is not None)
|
||||
wsp_disco.addSimpleServiceMetadata(service_types =
|
||||
(lasso.PP11_HREF,), abstract = abstract,
|
||||
provider_id = wsp.providerId, address = spSoapEndpoint,
|
||||
security_mechanisms= (lasso.SECURITY_MECH_BEARER,))
|
||||
self.failUnlessEqual(len(wsp_disco.metadatas), 1)
|
||||
metadata = wsp_disco.metadatas[0]
|
||||
self.failUnlessEqual(metadata.abstract, abstract)
|
||||
self.failUnlessEqual(metadata.providerId, wsp.providerId)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].serviceType), 1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].serviceType[0],
|
||||
lasso.PP11_HREF)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].endpointContext), 1)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].address),
|
||||
1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].endpointContext[0].address[0],
|
||||
spSoapEndpoint)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].securityMechId),
|
||||
1)
|
||||
self.failUnlessEqual(
|
||||
metadata.serviceContext[0].endpointContext[0].securityMechId[0],
|
||||
lasso.SECURITY_MECH_BEARER)
|
||||
self.failUnless(metadata.svcMDID is None)
|
||||
wsp_disco.buildRequestMsg()
|
||||
self.failUnlessEqual(wsp_disco.msgUrl, idpSoapEndpoint)
|
||||
self.failUnless(wsp_disco.msgBody is not None)
|
||||
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
self.failUnless(idp_disco is not None)
|
||||
try:
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
self.failUnless(idp_disco.request is not None)
|
||||
try:
|
||||
idp_disco.checkSecurityMechanism()
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
try:
|
||||
idp_disco.failRequest(lasso.IDWSF2_DISCOVERY_STATUS_CODE_FAILED, lasso.IDWSF2_DISCOVERY_STATUS_CODE_FORBIDDEN)
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
self.failUnless(idp_disco.response is not None)
|
||||
self.failUnless(idp_disco.response.status is not None)
|
||||
self.failUnless(idp_disco.response.status.code is not lasso.IDWSF2_DISCOVERY_STATUS_CODE_FAILED)
|
||||
self.failUnlessEqual(len(idp_disco.response.status.status), 1)
|
||||
self.failUnless(idp_disco.response.status.status[0].code is not lasso.IDWSF2_DISCOVERY_STATUS_CODE_FORBIDDEN)
|
||||
idp_disco.buildResponseMsg()
|
||||
self.failUnless(idp_disco.msgUrl is None)
|
||||
self.failUnless(idp_disco.msgBody is not None)
|
||||
|
||||
try:
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
except lasso.Idwsf2DiscoveryForbiddenError:
|
||||
pass
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
|
||||
def test03(self):
|
||||
"""Test metadata register with redirection"""
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, {})
|
||||
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(dst_epr)
|
||||
|
||||
abstract = 'Personal Profile service'
|
||||
wsp_disco.initMetadataRegister()
|
||||
soap_envelope = wsp_disco.getSoapEnvelopeRequest()
|
||||
soap_envelope.setSb2UserInteractionHint(lasso.IDWSF2_SB2_USER_INTERACTION_HINT_INTERACT_IF_NEEDED)
|
||||
self.failUnless(isinstance(soap_envelope.header, lasso.SoapHeader))
|
||||
self.failUnless(len(soap_envelope.header.other) > 0)
|
||||
self.failUnlessEqual(soap_envelope.getSb2UserInteractionHint(), lasso.IDWSF2_SB2_USER_INTERACTION_HINT_INTERACT_IF_NEEDED)
|
||||
self.failUnless(wsp_disco.request is not None)
|
||||
wsp_disco.addSimpleServiceMetadata(service_types =
|
||||
(lasso.PP11_HREF,), abstract = abstract,
|
||||
provider_id = wsp.providerId, address = spSoapEndpoint,
|
||||
security_mechanisms = (lasso.SECURITY_MECH_BEARER,))
|
||||
self.failUnlessEqual(len(wsp_disco.metadatas), 1)
|
||||
metadata = wsp_disco.metadatas[0]
|
||||
self.failUnlessEqual(metadata.abstract, abstract)
|
||||
self.failUnlessEqual(metadata.providerId, wsp.providerId)
|
||||
self.failUnlessEqual(len(metadata.serviceContext), 1)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].serviceType), 1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].serviceType[0],
|
||||
lasso.PP11_HREF)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].endpointContext), 1)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].address),
|
||||
1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].endpointContext[0].address[0],
|
||||
spSoapEndpoint)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].securityMechId),
|
||||
1)
|
||||
self.failUnlessEqual(
|
||||
metadata.serviceContext[0].endpointContext[0].securityMechId[0],
|
||||
lasso.SECURITY_MECH_BEARER)
|
||||
self.failUnless(metadata.svcMDID is None)
|
||||
wsp_disco.buildRequestMsg()
|
||||
self.failUnlessEqual(wsp_disco.msgUrl, idpSoapEndpoint)
|
||||
self.failUnless(wsp_disco.msgBody is not None)
|
||||
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
self.failUnless(idp_disco is not None)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
self.failUnless(idp_disco.request is not None)
|
||||
self.failUnlessEqual(len(idp_disco.request.svcMD), 1)
|
||||
self.failUnless(idp_disco.request.svcMD[0].svcMDID is None)
|
||||
soap_envelope = idp_disco.getSoapEnvelopeRequest()
|
||||
self.failUnless(soap_envelope is not None)
|
||||
self.failUnless(soap_envelope.getMessageId() is not None)
|
||||
try:
|
||||
idp_disco.checkSecurityMechanism()
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
# redirect
|
||||
interactionUrl = spInteractionUrl
|
||||
idp_disco.redirectUserForInteraction(interactionUrl, False)
|
||||
response = idp_disco.response
|
||||
self.failUnless(isinstance(response, lasso.SoapFault))
|
||||
self.failUnless(response.detail is not None)
|
||||
self.failUnlessEqual(len(response.detail.any), 1)
|
||||
self.failUnless(isinstance(response.detail.any[0], lasso.IdWsf2Sb2RedirectRequest))
|
||||
self.failUnless(response.detail.any[0].redirectURL.startswith(interactionUrl + '?transactionID='))
|
||||
try:
|
||||
idp_disco.buildResponseMsg()
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
self.failUnless(idp_disco.msgBody is not None)
|
||||
|
||||
|
||||
self.failUnless(idp_disco.msgUrl is None)
|
||||
self.failUnless(idp_disco.msgBody is not None)
|
||||
|
||||
try:
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
except lasso.WsfprofileRedirectRequestError:
|
||||
pass
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
response_envelope = wsp_disco.getSoapEnvelopeResponse()
|
||||
self.failUnless(response_envelope.sb2GetRedirectRequestUrl().startswith(interactionUrl + '?transactionID='))
|
||||
# Here keep information about the request associated to ID: response_envelope.getMessageId().content
|
||||
wsp_disco_dump = wsp_disco.dump()
|
||||
wsp_disco = lasso.Node.newFromDump(wsp_disco_dump)
|
||||
wsp_disco.server = wsp
|
||||
request_envelope = wsp_disco.getSoapEnvelopeRequest()
|
||||
self.failUnless(request_envelope is not None)
|
||||
relates_to = request_envelope.getRelatesTo(True)
|
||||
self.failUnless(relates_to is not None)
|
||||
response_message_id = response_envelope.getMessageId().content
|
||||
relates_to.content = response_message_id
|
||||
wsp_disco.buildRequestMsg()
|
||||
# now redo as for test01 after request building
|
||||
self.failUnlessEqual(wsp_disco.msgUrl, idpSoapEndpoint)
|
||||
self.failUnless(wsp_disco.msgBody is not None)
|
||||
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
self.failUnless(idp_disco is not None)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
self.failUnless(idp_disco.request is not None)
|
||||
self.failUnlessEqual(len(idp_disco.request.svcMD), 1)
|
||||
self.failUnless(idp_disco.request.svcMD[0].svcMDID is None)
|
||||
try:
|
||||
idp_disco.checkSecurityMechanism()
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
try:
|
||||
idp_disco.validateRequest()
|
||||
except lasso.Error as e:
|
||||
self.fail(e)
|
||||
self.failUnless(idp_disco.response is not None)
|
||||
self.failUnlessEqual(len(idp_disco.metadatas), 1)
|
||||
metadata = idp_disco.metadatas[0]
|
||||
self.failUnlessEqual(metadata.abstract, abstract)
|
||||
self.failUnlessEqual(metadata.providerId, wsp.providerId)
|
||||
self.failUnlessEqual(len(metadata.serviceContext), 1)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].serviceType), 1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].serviceType[0],
|
||||
lasso.PP11_HREF)
|
||||
self.failUnlessEqual(len(metadata.serviceContext[0].endpointContext), 1)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].address),
|
||||
1)
|
||||
self.failUnlessEqual(metadata.serviceContext[0].endpointContext[0].address[0],
|
||||
spSoapEndpoint)
|
||||
self.failUnlessEqual(
|
||||
len(metadata.serviceContext[0].endpointContext[0].securityMechId),
|
||||
1)
|
||||
self.failUnlessEqual(
|
||||
metadata.serviceContext[0].endpointContext[0].securityMechId[0],
|
||||
lasso.SECURITY_MECH_BEARER)
|
||||
idp_disco.buildResponseMsg()
|
||||
self.failUnless(metadata.svcMDID is not None)
|
||||
self.failUnless(idp_disco.msgUrl is None)
|
||||
self.failUnless(idp_disco.msgBody is not None)
|
||||
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
|
||||
self.failUnless(len(wsp_disco.metadatas) == 1, 'missing svcMDID')
|
||||
self.failUnless(wsp_disco.metadatas[0].svcMDID, 'missing svcMDID')
|
||||
|
||||
def test04(self):
|
||||
"""Test metadata query"""
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
federations = {}
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, federations)
|
||||
service_map = {}
|
||||
self.metadataRegister(wsp, idp, wsp_session_dump, service_types =
|
||||
(lasso.PP11_HREF,), address = spSoapEndpoint,
|
||||
abstract = 'My first PP service', services_map = service_map)
|
||||
self.metadataRegister(wsp, idp, wsp_session_dump, service_types =
|
||||
(lasso.PP11_HREF,), address = spSoapEndpoint+'2',
|
||||
abstract = 'My second PP service', services_map = service_map)
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, federations)
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(dst_epr)
|
||||
wsp_disco.initMetadataQuery()
|
||||
wsp_disco.buildRequestMsg()
|
||||
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
idp_disco.checkSecurityMechanism()
|
||||
self.failUnlessEqual(idp_disco.svcmdids, ())
|
||||
sender = idp_disco.getSoapEnvelopeRequest().sb2GetProviderId()
|
||||
for svcMDID in service_map.get(sender, []):
|
||||
idp_disco.addServiceMetadata(service_map.get(svcMDID))
|
||||
idp_disco.validateRequest()
|
||||
idp_disco.buildResponseMsg()
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
self.failUnless(len(wsp_disco.metadatas), 2)
|
||||
|
||||
def test05(self):
|
||||
"""Test metadata delete"""
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, {})
|
||||
service_map = {}
|
||||
self.metadataRegister(wsp, idp, wsp_session_dump, service_types =
|
||||
(lasso.PP11_HREF,), address = spSoapEndpoint,
|
||||
abstract = 'My first PP service', services_map = service_map)
|
||||
self.metadataRegister(wsp, idp, wsp_session_dump, service_types =
|
||||
(lasso.PP11_HREF,), address = spSoapEndpoint+'2',
|
||||
abstract = 'My second PP service', services_map = service_map)
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, {})
|
||||
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(dst_epr)
|
||||
wsp_disco.initMetadataDelete()
|
||||
svcmdids = tuple(service_map[wsp.providerId])
|
||||
wsp_disco.setSvcmdids(svcmdids)
|
||||
wsp_disco.buildRequestMsg()
|
||||
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
idp_disco.checkSecurityMechanism()
|
||||
self.failUnlessEqual(idp_disco.svcmdids, svcmdids)
|
||||
sender = idp_disco.getSoapEnvelopeRequest().sb2GetProviderId()
|
||||
self.failUnlessEqual(sender, wsp.providerId)
|
||||
idp_disco.validateRequest()
|
||||
idp_disco.buildResponseMsg()
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
|
||||
class MetadataAssociationTestCase(IdWsf2TestCase):
|
||||
def test01(self):
|
||||
"""Metadata association add"""
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, dst_epr = self.login(wsp, idp, 1, {})
|
||||
service_map = {}
|
||||
svcMDID = self.metadataRegister(wsp, idp, wsp_session_dump, service_types =
|
||||
(lasso.PP11_HREF,), address = spSoapEndpoint,
|
||||
abstract = 'My first PP service', services_map = service_map)
|
||||
# Make the request
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(dst_epr)
|
||||
wsp_disco.initMetadataAssociationAdd()
|
||||
wsp_disco.svcmdids = (svcMDID,)
|
||||
wsp_disco.buildRequestMsg()
|
||||
# Receive it
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
idp_disco.checkSecurityMechanism()
|
||||
self.failUnlessEqual(idp_disco.svcmdids, (svcMDID,))
|
||||
sender = idp_disco.getSoapEnvelopeRequest().sb2GetProviderId()
|
||||
name_identifier = idp_disco.getNameIdentifier()
|
||||
# Store the association
|
||||
self.failUnless(sender is not None)
|
||||
self.failUnless(name_identifier is not None)
|
||||
idp_disco.validateRequest()
|
||||
idp_disco.buildResponseMsg()
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
|
||||
def test02(self):
|
||||
"""Metadata association query"""
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsc = self.getWscServer()
|
||||
# Register the service, add an association
|
||||
federations = {}
|
||||
wsp_identity_dump, wsp_session_dump, \
|
||||
idp_identity_dump, idp_session_dump, \
|
||||
wsp_dst_epr = self.login(wsp, idp, 1, federations)
|
||||
service_maps = {}
|
||||
svcMDID = self.metadataRegister(wsp, idp, wsp_session_dump,
|
||||
service_types = (lasso.PP11_HREF,), address = spSoapEndpoint,
|
||||
abstract = 'My first PP service', services_map = service_maps)
|
||||
service_associations = {}
|
||||
self.addAssociation(wsp, idp, wsp_session_dump, svcMDID, service_maps,
|
||||
federations, service_associations)
|
||||
# Start a query
|
||||
wsp_disco = lasso.IdWsf2Discovery(wsp)
|
||||
wsp_disco.setEpr(wsp_dst_epr)
|
||||
wsp_disco.initMetadataAssociationQuery()
|
||||
wsp_disco.buildRequestMsg()
|
||||
#
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.processRequestMsg(wsp_disco.msgBody)
|
||||
idp_disco.checkSecurityMechanism()
|
||||
self.failUnlessEqual(idp_disco.svcmdids, ())
|
||||
f = self.nid2tuple(idp_disco.getNameIdentifier())
|
||||
uid = federations[f]
|
||||
result = []
|
||||
for svcmdid in service_associations[uid]:
|
||||
result.append(svcmdid)
|
||||
idp_disco.svcmdids = tuple(result)
|
||||
idp_disco.validateRequest()
|
||||
idp_disco.buildResponseMsg()
|
||||
wsp_disco.processResponseMsg(idp_disco.msgBody)
|
||||
self.failUnlessEqual(wsp_disco.svcmdids, (svcMDID,))
|
||||
|
||||
def test03(self):
|
||||
"""Metadata association delete"""
|
||||
pass
|
||||
|
||||
class QueryTestCase(IdWsf2TestCase):
|
||||
def test01(self):
|
||||
"""Discovery Service Query"""
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsc = self.getWscServer()
|
||||
federations = {}
|
||||
# Register the service, add an association
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, idp_session_dump, wsp_dst_epr = self.login(wsp, idp, 1, federations)
|
||||
service_maps = {}
|
||||
svcMDID = self.metadataRegister(wsp, idp, wsp_session_dump, service_types =
|
||||
(lasso.PP11_HREF,), address = spSoapEndpoint,
|
||||
abstract = 'My first PP service', services_map = service_maps)
|
||||
service_associations = {}
|
||||
self.addAssociation(wsp, idp, wsp_session_dump, svcMDID, service_maps, federations, service_associations)
|
||||
# Try to find the service
|
||||
wsc_identity_dump, wsc_session_dump, idp_identity_dump, idp_session_dump, wsc_dst_epr = self.login(wsc, idp, 1, federations, idp_identity_dump = idp_identity_dump, idp_session_dump = idp_session_dump)
|
||||
wsc_disco = lasso.IdWsf2Discovery(wsc)
|
||||
wsc_disco.setEpr(wsc_dst_epr)
|
||||
wsc_disco.initQuery()
|
||||
wsc_disco.addRequestedService(service_types = (lasso.PP11_HREF,))
|
||||
wsc_disco.buildRequestMsg()
|
||||
idp_disco = lasso.IdWsf2Discovery(idp)
|
||||
idp_disco.setIdentityFromDump(idp_identity_dump)
|
||||
idp_disco.processRequestMsg(wsc_disco.msgBody)
|
||||
f = self.nid2tuple(idp_disco.getNameIdentifier())
|
||||
uid = federations[f]
|
||||
for id in service_associations[uid]:
|
||||
idp_disco.addServiceMetadata(service_maps[id])
|
||||
idp_disco.validateRequest()
|
||||
idp_disco.buildResponseMsg()
|
||||
wsc_disco.processResponseMsg(idp_disco.msgBody)
|
||||
self.failUnlessEqual(len(wsc_disco.endpointReferences), 1)
|
||||
|
||||
class DstTestCase(IdWsf2TestCase):
|
||||
def test01(self):
|
||||
"""Data Service Template Query"""
|
||||
content = '<pp:PP xmlns:pp="%s">Coin</pp:PP>' % lasso.PP11_HREF
|
||||
idp = self.getIdpServer()
|
||||
wsp = self.getWspServer()
|
||||
wsc = self.getWscServer()
|
||||
federations = {}
|
||||
# Register the service, add an association
|
||||
wsp_identity_dump, wsp_session_dump, idp_identity_dump, \
|
||||
idp_session_dump, wsp_dst_epr = self.login(wsp, idp, 1,
|
||||
federations)
|
||||
service_maps = {}
|
||||
svcMDID = self.metadataRegister(wsp, idp, wsp_session_dump,
|
||||
service_types = (lasso.PP11_HREF,), address =
|
||||
spSoapEndpoint, abstract = 'My first PP service',
|
||||
services_map = service_maps)
|
||||
service_associations = {}
|
||||
self.addAssociation(wsp, idp, wsp_session_dump, svcMDID,
|
||||
service_maps, federations, service_associations)
|
||||
wsc_identity_dump, wsc_session_dump, idp_identity_dump, \
|
||||
idp_session_dump, wsc_dst_epr = self.login(wsc, idp, 1, federations,
|
||||
idp_identity_dump = idp_identity_dump, idp_session_dump =
|
||||
idp_session_dump)
|
||||
eprs = self.query(wsc, idp, idp_identity_dump, wsc_session_dump, 1,
|
||||
federations, service_maps, service_associations,
|
||||
service_types = (lasso.PP11_HREF,))
|
||||
self.failUnless(len(eprs), 1)
|
||||
lasso.registerIdwsf2DstService(lasso.PP11_PREFIX, lasso.PP11_HREF)
|
||||
wsc_dst = lasso.IdWsf2DataService(wsc)
|
||||
wsc_dst.setEpr(eprs[0])
|
||||
wsc_dst.initQuery()
|
||||
wsc_dst.setServiceType(lasso.PP11_PREFIX, lasso.PP11_HREF)
|
||||
wsc_dst.addQueryItem('/%s:PP' % lasso.PP11_PREFIX, 'xxx')
|
||||
wsc_dst.buildRequestMsg()
|
||||
wsp_dst = lasso.IdWsf2DataService(wsp)
|
||||
wsp_dst.processRequestMsg(wsc_dst.msgBody)
|
||||
self.failUnlessEqual(wsp_dst.requestType, lasso.IDWSF2_DATA_SERVICE_REQUEST_TYPE_QUERY)
|
||||
wsp_dst.checkSecurityMechanism()
|
||||
data = ET.parse(StringIO(content))
|
||||
for item in wsp_dst.items:
|
||||
result = data.xpath(item.select, namespaces = { lasso.PP11_PREFIX: lasso.PP11_HREF })
|
||||
for found in result:
|
||||
wsp_dst.setQueryItemResult(item.itemId, ET.tostring(found), True)
|
||||
wsp_dst.setServiceType(lasso.PP11_PREFIX, lasso.PP11_HREF)
|
||||
wsp_dst.validateRequest()
|
||||
wsp_dst.buildResponseMsg()
|
||||
wsc_dst.processResponseMsg(wsp_dst.msgBody)
|
||||
|
||||
|
||||
metadataSuite = unittest.makeSuite(MetadataTestCase, 'test')
|
||||
metadataAssociationSuite = unittest.makeSuite(MetadataAssociationTestCase, 'test')
|
||||
querySuite = unittest.makeSuite(QueryTestCase, 'test')
|
||||
dstSuite = unittest.makeSuite(DstTestCase, 'test')
|
||||
|
||||
|
||||
allTests = unittest.TestSuite((metadataSuite,
|
||||
metadataAssociationSuite,querySuite,dstSuite))
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(not unittest.TextTestRunner(verbosity = 2).run(allTests).wasSuccessful())
|
||||
|
|
@ -47,9 +47,6 @@ testSuites = [
|
|||
]
|
||||
|
||||
import lasso
|
||||
if lasso.WSF_SUPPORT:
|
||||
testSuites.append('idwsf1_tests')
|
||||
testSuites.append('idwsf2_tests')
|
||||
|
||||
|
||||
# Parse command line options.
|
||||
|
|
|
@ -86,9 +86,6 @@ def format_as_camelcase(var):
|
|||
def format_as_underscored(var):
|
||||
'''Format an identifier name into underscored_name'''
|
||||
var = '_'.join(camelcase_to_list(var))
|
||||
var = var.replace('id_wsf2_', 'idwsf2_')
|
||||
var = var.replace('_saslresponse', '_sasl_response')
|
||||
var = var.replace('ws_addr_', 'wsa_')
|
||||
return var
|
||||
|
||||
def format_underscore_as_camelcase(var):
|
||||
|
|
32
configure.ac
32
configure.ac
|
@ -679,18 +679,6 @@ AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
|||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
|
||||
dnl Check if wsf is explicitly disabled.
|
||||
AC_ARG_ENABLE(wsf, [ --enable-wsf enable experimental ID-WSF],
|
||||
enable_wsf="yes", enable_wsf="no")
|
||||
|
||||
AM_CONDITIONAL([WSF_ENABLED],[test "x$enable_wsf" = "xyes"])
|
||||
LASSO_WSF_SUPPORT=0
|
||||
if test "x$enable_wsf" = "xyes"; then
|
||||
AC_DEFINE(LASSO_WSF_ENABLED, [], [Define if ID-WSF support is enabled])
|
||||
LASSO_WSF_SUPPORT=1
|
||||
fi
|
||||
AC_SUBST(LASSO_WSF_SUPPORT)
|
||||
|
||||
|
||||
dnl API Reference documentation support
|
||||
# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have
|
||||
|
@ -746,21 +734,6 @@ fi
|
|||
|
||||
AM_CONDITIONAL(WITH_TESTS, [test "x$enable_tests" = "xyes"])
|
||||
|
||||
AC_ARG_WITH(sasl2, [ --with-sasl2[=PFX] Use Cyrus SASL library version 2 for WSF-Auth])
|
||||
if test "x$enable_wsf" = "xyes"; then
|
||||
if test "$with_sasl2" != "no" && test "$with_sasl2" != "yes"
|
||||
then
|
||||
CPPFLAGS="$CPPFLAGS -I$with_sasl2/include"
|
||||
LDFLAGS="$LDFLAGS -L$with_sasl2/lib"
|
||||
fi
|
||||
|
||||
saved_LIBS="$LIBS"
|
||||
AC_CHECK_LIB(sasl2, sasl_server_init,,
|
||||
AC_MSG_ERROR([libsasl must be installed for WSF support]),)
|
||||
LIBS="$saved_LIBS"
|
||||
LASSO_LIBS="$LASSO_LIBS -lsasl2"
|
||||
fi
|
||||
|
||||
AC_CHECK_PROGS(REST2HTML, rest2html rst2html)
|
||||
AM_CONDITIONAL(HAVE_REST2HTML, test -n "$ac_cv_prog_REST2HTML")
|
||||
|
||||
|
@ -907,15 +880,11 @@ docs/reference/lasso/version.xml
|
|||
docs/reference/lasso/Makefile
|
||||
lasso/Makefile
|
||||
lasso/id-ff/Makefile
|
||||
lasso/id-wsf/Makefile
|
||||
lasso/saml-2.0/Makefile
|
||||
lasso/id-wsf-2.0/Makefile
|
||||
lasso/xml/Makefile
|
||||
lasso/xml/ecp/Makefile
|
||||
lasso/xml/saml-2.0/Makefile
|
||||
lasso/xml/soap-1.1/Makefile
|
||||
lasso/xml/id-wsf-2.0/Makefile
|
||||
lasso/xml/ws/Makefile
|
||||
lasso/xml/dsig/Makefile
|
||||
tests/Makefile
|
||||
tests/data/Makefile
|
||||
|
@ -961,7 +930,6 @@ Compiler: ${CC}
|
|||
CFLAGS: ${AM_CFLAGS} ${CFLAGS}
|
||||
Install prefix: ${prefix}
|
||||
Debugging: $enable_debugging
|
||||
Experimental ID-WSF: $enable_wsf
|
||||
|
||||
Optionals builds
|
||||
----------------
|
||||
|
|
|
@ -81,12 +81,12 @@ EXTRA_HFILES=
|
|||
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
|
||||
IGNORE_HFILES= sessionprivate.h logoutprivate.h loginprivate.h profileprivate.h \
|
||||
identityprivate.h serverprivate.h providerprivate.h id_ff_extensions_private.h \
|
||||
wsf_profile_private.h private.h saml_2_0_loginprivate.h \
|
||||
private.h saml_2_0_loginprivate.h \
|
||||
saml_2_0_profileprivate.h saml_2_0_logoutprivate.h ecpprivate.h \
|
||||
saml_2_0_serverprivate.h saml_2_0_providerprivate.h federationprivate.h \
|
||||
registry-private.h id_wsf_2_0_sessionprivate.h id_wsf_2_0_serverprivate.h \
|
||||
saml2_login_private.h id_wsf_2_0_private.h \
|
||||
backward_comp.h id_wsf_2.h id_wsf.h lasso_config.h utils.h debug.h
|
||||
registry-private.h \
|
||||
saml2_login_private.h \
|
||||
backward_comp.h lasso_config.h utils.h debug.h
|
||||
# Images to copy into HTML directory.
|
||||
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
|
||||
HTML_IMAGES=
|
||||
|
@ -115,23 +115,13 @@ include $(top_srcdir)/gtk-doc.make
|
|||
|
||||
# Other files to distribute
|
||||
# e.g. EXTRA_DIST += version.xml.in
|
||||
EXTRA_DIST += lasso-sections.txt lasso-docs.xml version.xml.in lasso.types.in style.css
|
||||
EXTRA_DIST += lasso-sections.txt lasso-docs.xml version.xml.in lasso.types style.css
|
||||
|
||||
# Files not to distribute
|
||||
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
|
||||
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
|
||||
# DISTCLEANFILES =
|
||||
|
||||
# Generate lasso.types depending on the WSF_ENABLED flag
|
||||
if WSF_ENABLED
|
||||
lasso.types: lasso.types.in
|
||||
sed -e 's/#WSF# //g' < $(srcdir)/lasso.types.in > lasso.types
|
||||
else
|
||||
lasso.types: lasso.types.in
|
||||
grep -v '#WSF#' $(srcdir)/lasso.types.in > lasso.types
|
||||
endif
|
||||
|
||||
|
||||
# Comment this out if you want your docs-status tested during 'make check'
|
||||
if ENABLE_GTK_DOC
|
||||
TESTS_ENVIRONMENT = cd $(srcdir)
|
||||
|
|
|
@ -295,213 +295,6 @@ the <ulink url="http://lasso.entrouvert.org/license">GNU General Public License<
|
|||
<xi:include href="xml/ecp_relaystate.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="idwsf">
|
||||
<title>Identity Web Services Framework 1.0</title>
|
||||
|
||||
<xi:include href="xml/discovery.xml"/>
|
||||
<xi:include href="xml/data_service.xml"/>
|
||||
<xi:include href="xml/personal_profile_service.xml"/>
|
||||
<xi:include href="xml/authentication.xml"/>
|
||||
<xi:include href="xml/wsf_profile.xml"/>
|
||||
<xi:include href="xml/interaction_profile_service.xml"/>
|
||||
<xi:include href="xml/id_wsf_utils.xml"/>
|
||||
</chapter>
|
||||
<chapter id="xml-idwsf">
|
||||
<title>Objects from ID-WSF 1.0 schemas</title>
|
||||
<xi:include href="xml/id_wsf_strings.xml"/>
|
||||
<xi:include href="xml/disco_authenticate_requester.xml"/>
|
||||
<xi:include href="xml/disco_authenticate_session_context.xml"/>
|
||||
<xi:include href="xml/disco_authorize_requester.xml"/>
|
||||
<xi:include href="xml/disco_credentials.xml"/>
|
||||
<xi:include href="xml/disco_description.xml"/>
|
||||
<xi:include href="xml/disco_encrypted_resource_id.xml"/>
|
||||
<xi:include href="xml/disco_encrypt_resource_id.xml"/>
|
||||
<xi:include href="xml/disco_generate_bearer_token.xml"/>
|
||||
<xi:include href="xml/disco_insert_entry.xml"/>
|
||||
<xi:include href="xml/disco_modify_response.xml"/>
|
||||
<xi:include href="xml/disco_modify.xml"/>
|
||||
<xi:include href="xml/disco_options.xml"/>
|
||||
<xi:include href="xml/disco_query_response.xml"/>
|
||||
<xi:include href="xml/disco_query.xml"/>
|
||||
<xi:include href="xml/disco_remove_entry.xml"/>
|
||||
<xi:include href="xml/disco_requested_service_type.xml"/>
|
||||
<xi:include href="xml/disco_resource_id.xml"/>
|
||||
<xi:include href="xml/disco_resource_offering.xml"/>
|
||||
<xi:include href="xml/disco_send_single_logout.xml"/>
|
||||
<xi:include href="xml/disco_service_instance.xml"/>
|
||||
<xi:include href="xml/dst_data.xml"/>
|
||||
<xi:include href="xml/dst_modification.xml"/>
|
||||
<xi:include href="xml/dst_modify_response.xml"/>
|
||||
<xi:include href="xml/dst_modify.xml"/>
|
||||
<xi:include href="xml/dst_new_data.xml"/>
|
||||
<xi:include href="xml/dst_query_item.xml"/>
|
||||
<xi:include href="xml/dst_query_response.xml"/>
|
||||
<xi:include href="xml/dst_query.xml"/>
|
||||
<xi:include href="xml/is_redirect_request.xml"/>
|
||||
<xi:include href="xml/is_user_interaction.xml"/>
|
||||
<xi:include href="xml/sa_credentials.xml"/>
|
||||
<xi:include href="xml/sa_parameter.xml"/>
|
||||
<xi:include href="xml/sa_password_transforms.xml"/>
|
||||
<xi:include href="xml/sa_sasl_request.xml"/>
|
||||
<xi:include href="xml/sa_sasl_response.xml"/>
|
||||
<xi:include href="xml/sa_transform.xml"/>
|
||||
<xi:include href="xml/sec_resource_access_statement.xml"/>
|
||||
<xi:include href="xml/soap_binding_consent.xml"/>
|
||||
<xi:include href="xml/soap_binding_correlation.xml"/>
|
||||
<xi:include href="xml/soap_binding_ext_credentials_context.xml"/>
|
||||
<xi:include href="xml/soap_binding_ext_credential.xml"/>
|
||||
<xi:include href="xml/soap_binding_ext_service_instance_update.xml"/>
|
||||
<xi:include href="xml/soap_binding_ext_timeout.xml"/>
|
||||
<xi:include href="xml/soap_binding_processing_context.xml"/>
|
||||
<xi:include href="xml/soap_binding_provider.xml"/>
|
||||
<xi:include href="xml/soap_binding_usage_directive.xml"/>
|
||||
<xi:include href="xml/utility_status.xml"/>
|
||||
</chapter>
|
||||
<chapter id="idwsf2">
|
||||
<title>ID-WSF 2.0</title>
|
||||
<xi:include href="xml/soap_binding2.xml"/>
|
||||
<xi:include href="xml/id_wsf_2_0_discovery.xml"/>
|
||||
<xi:include href="xml/id_wsf_2_0_data_service.xml"/>
|
||||
<xi:include href="xml/id_wsf_2_0_profile.xml"/>
|
||||
<xi:include href="xml/id_wsf_2_0_login.xml"/>
|
||||
</chapter>
|
||||
<chapter id="xml-idwsf2">
|
||||
<title>Objects from ID-WSF 2.0 schemas</title>
|
||||
<xi:include href="xml/id_wsf2_strings.xml"/>
|
||||
<xi:include href="xml/disco_service_type.xml"/>
|
||||
<xi:include href="xml/disco_abstract.xml"/>
|
||||
<xi:include href="xml/disco_endpoint_context.xml"/>
|
||||
<xi:include href="xml/disco_keys.xml"/>
|
||||
<xi:include href="xml/disco_provider_id.xml"/>
|
||||
<xi:include href="xml/disco_requested_service.xml"/>
|
||||
<xi:include href="xml/disco_security_context.xml"/>
|
||||
<xi:include href="xml/disco_service_context.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_association_add_response.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_association_add.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_association_delete_response.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_association_delete.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_association_query_response.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_association_query.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_delete_response.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_delete.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_query_response.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_query.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_register_response.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_register.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_replace_response.xml"/>
|
||||
<xi:include href="xml/disco_svc_md_replace.xml"/>
|
||||
<xi:include href="xml/disco_svc_metadata.xml"/>
|
||||
<xi:include href="xml/dst_data_response_base.xml"/>
|
||||
<xi:include href="xml/dst_delete_item_base.xml"/>
|
||||
<xi:include href="xml/dst_delete_response.xml"/>
|
||||
<xi:include href="xml/dstref_app_data.xml"/>
|
||||
<xi:include href="xml/dstref_create_item.xml"/>
|
||||
<xi:include href="xml/dstref_create_response.xml"/>
|
||||
<xi:include href="xml/dstref_create.xml"/>
|
||||
<xi:include href="xml/dstref_data_response.xml"/>
|
||||
<xi:include href="xml/dstref_data.xml"/>
|
||||
<xi:include href="xml/dstref_delete_item.xml"/>
|
||||
<xi:include href="xml/dstref_delete_response.xml"/>
|
||||
<xi:include href="xml/dstref_delete.xml"/>
|
||||
<xi:include href="xml/dstref_item_data.xml"/>
|
||||
<xi:include href="xml/dstref_modify_item.xml"/>
|
||||
<xi:include href="xml/dstref_modify_response.xml"/>
|
||||
<xi:include href="xml/dstref_modify.xml"/>
|
||||
<xi:include href="xml/dstref_query_item.xml"/>
|
||||
<xi:include href="xml/dstref_query_response.xml"/>
|
||||
<xi:include href="xml/dstref_query.xml"/>
|
||||
<xi:include href="xml/dstref_result_query.xml"/>
|
||||
<xi:include href="xml/dstref_test_item.xml"/>
|
||||
<xi:include href="xml/dst_request.xml"/>
|
||||
<xi:include href="xml/dst_result_query_base.xml"/>
|
||||
<xi:include href="xml/dst_test_item_base.xml"/>
|
||||
<xi:include href="xml/ims_identity_mapping_request.xml"/>
|
||||
<xi:include href="xml/ims_identity_mapping_response.xml"/>
|
||||
<xi:include href="xml/ims_mapping_input.xml"/>
|
||||
<xi:include href="xml/ims_mapping_output.xml"/>
|
||||
<xi:include href="xml/is_help.xml"/>
|
||||
<xi:include href="xml/is_inquiry_element.xml"/>
|
||||
<xi:include href="xml/is_inquiry.xml"/>
|
||||
<xi:include href="xml/is_interaction_request.xml"/>
|
||||
<xi:include href="xml/is_interaction_response.xml"/>
|
||||
<xi:include href="xml/is_interaction_statement.xml"/>
|
||||
<xi:include href="xml/is_item.xml"/>
|
||||
<xi:include href="xml/is_parameter.xml"/>
|
||||
<xi:include href="xml/is_select.xml"/>
|
||||
<xi:include href="xml/is_text.xml"/>
|
||||
<xi:include href="xml/ps_add_collection_request.xml"/>
|
||||
<xi:include href="xml/ps_add_collection_response.xml"/>
|
||||
<xi:include href="xml/ps_add_entity_request.xml"/>
|
||||
<xi:include href="xml/ps_add_entity_response.xml"/>
|
||||
<xi:include href="xml/ps_add_known_entity_request.xml"/>
|
||||
<xi:include href="xml/ps_add_known_entity_response.xml"/>
|
||||
<xi:include href="xml/ps_add_to_collection_request.xml"/>
|
||||
<xi:include href="xml/ps_get_object_info_request.xml"/>
|
||||
<xi:include href="xml/ps_get_object_info_response.xml"/>
|
||||
<xi:include href="xml/ps_item_data.xml"/>
|
||||
<xi:include href="xml/ps_list_members_request.xml"/>
|
||||
<xi:include href="xml/ps_list_members_response.xml"/>
|
||||
<xi:include href="xml/ps_notification.xml"/>
|
||||
<xi:include href="xml/ps_notify.xml"/>
|
||||
<xi:include href="xml/ps_object.xml"/>
|
||||
<xi:include href="xml/ps_query_objects_request.xml"/>
|
||||
<xi:include href="xml/ps_query_objects_response.xml"/>
|
||||
<xi:include href="xml/ps_remove_collection_request.xml"/>
|
||||
<xi:include href="xml/ps_remove_entity_request.xml"/>
|
||||
<xi:include href="xml/ps_remove_from_collection_request.xml"/>
|
||||
<xi:include href="xml/ps_request_abstract.xml"/>
|
||||
<xi:include href="xml/ps_resolve_identifier_request.xml"/>
|
||||
<xi:include href="xml/ps_resolve_identifier_response.xml"/>
|
||||
<xi:include href="xml/ps_resolve_input.xml"/>
|
||||
<xi:include href="xml/ps_response_abstract.xml"/>
|
||||
<xi:include href="xml/ps_set_object_info_request.xml"/>
|
||||
<xi:include href="xml/ps_test_membership_request.xml"/>
|
||||
<xi:include href="xml/ps_test_membership_response.xml"/>
|
||||
<xi:include href="xml/sb2_consent.xml"/>
|
||||
<xi:include href="xml/sb2_credentials_context.xml"/>
|
||||
<xi:include href="xml/sb2_endpoint_update.xml"/>
|
||||
<xi:include href="xml/sb2_redirect_request.xml"/>
|
||||
<xi:include href="xml/sb2_sender.xml"/>
|
||||
<xi:include href="xml/sb2_target_identity.xml"/>
|
||||
<xi:include href="xml/sb2_timeout.xml"/>
|
||||
<xi:include href="xml/sb2_usage_directive.xml"/>
|
||||
<xi:include href="xml/sb2_user_interaction_header.xml"/>
|
||||
<xi:include href="xml/sbf_framework.xml"/>
|
||||
<xi:include href="xml/sec_token_policy.xml"/>
|
||||
<xi:include href="xml/sec_token.xml"/>
|
||||
<xi:include href="xml/sec_transited_provider_path.xml"/>
|
||||
<xi:include href="xml/subs_notification.xml"/>
|
||||
<xi:include href="xml/subs_notify_response.xml"/>
|
||||
<xi:include href="xml/subsref_app_data.xml"/>
|
||||
<xi:include href="xml/subsref_create_item.xml"/>
|
||||
<xi:include href="xml/subsref_create_response.xml"/>
|
||||
<xi:include href="xml/subsref_create.xml"/>
|
||||
<xi:include href="xml/subsref_data_response.xml"/>
|
||||
<xi:include href="xml/subsref_data.xml"/>
|
||||
<xi:include href="xml/subsref_delete_item.xml"/>
|
||||
<xi:include href="xml/subsref_delete_response.xml"/>
|
||||
<xi:include href="xml/subsref_delete.xml"/>
|
||||
<xi:include href="xml/subsref_item_data.xml"/>
|
||||
<xi:include href="xml/subs_ref_item.xml"/>
|
||||
<xi:include href="xml/subsref_modify_item.xml"/>
|
||||
<xi:include href="xml/subsref_modify_response.xml"/>
|
||||
<xi:include href="xml/subsref_modify.xml"/>
|
||||
<xi:include href="xml/subsref_notification.xml"/>
|
||||
<xi:include href="xml/subsref_notify_response.xml"/>
|
||||
<xi:include href="xml/subsref_notify.xml"/>
|
||||
<xi:include href="xml/subsref_query_item.xml"/>
|
||||
<xi:include href="xml/subsref_query_response.xml"/>
|
||||
<xi:include href="xml/subsref_query.xml"/>
|
||||
<xi:include href="xml/subsref_result_query.xml"/>
|
||||
<xi:include href="xml/subsref_subscription.xml"/>
|
||||
<xi:include href="xml/subsref_test_item.xml"/>
|
||||
<xi:include href="xml/subs_subscription.xml"/>
|
||||
<xi:include href="xml/util_empty.xml"/>
|
||||
<xi:include href="xml/util_extension.xml"/>
|
||||
<xi:include href="xml/util_response.xml"/>
|
||||
<xi:include href="xml/util_status.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="soap">
|
||||
<title>Object from the SOAP 1.1 schemas</title>
|
||||
<xi:include href="xml/soap_body.xml"/>
|
||||
|
@ -520,26 +313,6 @@ the <ulink url="http://lasso.entrouvert.org/license">GNU General Public License<
|
|||
<xi:include href="xml/dsig_strings.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter id="ws-addr">
|
||||
<title>Object from the WS-* schemas</title>
|
||||
<xi:include href="xml/wsa_attributed_any.xml"/>
|
||||
<xi:include href="xml/wsa_attributed_qname.xml"/>
|
||||
<xi:include href="xml/wsa_attributed_unsigned_long.xml"/>
|
||||
<xi:include href="xml/wsa_attributed_uri.xml"/>
|
||||
<xi:include href="xml/wsa_endpoint_reference.xml"/>
|
||||
<xi:include href="xml/wsa_metadata.xml"/>
|
||||
<xi:include href="xml/wsa_problem_action.xml"/>
|
||||
<xi:include href="xml/wsa_reference_parameters.xml"/>
|
||||
<xi:include href="xml/wsa_relates_to.xml"/>
|
||||
<xi:include href="xml/wsse_embedded.xml"/>
|
||||
<xi:include href="xml/wsse_reference.xml"/>
|
||||
<xi:include href="xml/wsse_security_header.xml"/>
|
||||
<xi:include href="xml/wsse_security_token_reference.xml"/>
|
||||
<xi:include href="xml/wsse_transformation_parameters.xml"/>
|
||||
<xi:include href="xml/wsse_username_token.xml"/>
|
||||
<xi:include href="xml/wsu_timestamp.xml"/>
|
||||
<xi:include href="xml/ws_strings.xml"/>
|
||||
</chapter>
|
||||
</reference>
|
||||
|
||||
<index id="api-index-full">
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,126 @@
|
|||
#include <lasso/lasso.h>
|
||||
#include <lasso/xml/xml_idff.h>
|
||||
#include <lasso/xml/saml-2.0/xml_saml2.h>
|
||||
#include <lasso/xml/soap-1.1/xml_soap11.h>
|
||||
|
||||
lasso_assertion_query_get_type
|
||||
lasso_defederation_get_type
|
||||
lasso_ds_key_info_get_type
|
||||
lasso_ds_key_value_get_type
|
||||
lasso_ds_rsa_key_value_get_type
|
||||
lasso_ecp_get_type
|
||||
lasso_federation_get_type
|
||||
lasso_identity_get_type
|
||||
lasso_lecp_get_type
|
||||
lasso_lib_assertion_get_type
|
||||
lasso_lib_authentication_statement_get_type
|
||||
lasso_lib_authn_context_get_type
|
||||
lasso_lib_authn_request_envelope_get_type
|
||||
lasso_lib_authn_request_get_type
|
||||
lasso_lib_authn_response_envelope_get_type
|
||||
lasso_lib_authn_response_get_type
|
||||
lasso_lib_federation_termination_notification_get_type
|
||||
lasso_lib_idp_entries_get_type
|
||||
lasso_lib_idp_entry_get_type
|
||||
lasso_lib_idp_list_get_type
|
||||
lasso_lib_logout_request_get_type
|
||||
lasso_lib_logout_response_get_type
|
||||
lasso_lib_name_identifier_mapping_request_get_type
|
||||
lasso_lib_name_identifier_mapping_response_get_type
|
||||
lasso_lib_register_name_identifier_request_get_type
|
||||
lasso_lib_register_name_identifier_response_get_type
|
||||
lasso_lib_request_authn_context_get_type
|
||||
lasso_lib_scoping_get_type
|
||||
lasso_lib_status_response_get_type
|
||||
lasso_lib_subject_get_type
|
||||
lasso_login_get_type
|
||||
lasso_logout_get_type
|
||||
lasso_misc_text_node_get_type
|
||||
lasso_name_identifier_mapping_get_type
|
||||
lasso_name_id_management_get_type
|
||||
lasso_name_registration_get_type
|
||||
lasso_node_get_type
|
||||
lasso_profile_get_type
|
||||
lasso_provider_get_type
|
||||
lasso_saml2_action_get_type
|
||||
lasso_saml2_advice_get_type
|
||||
lasso_saml2_assertion_get_type
|
||||
lasso_saml2_attribute_get_type
|
||||
lasso_saml2_attribute_statement_get_type
|
||||
lasso_saml2_attribute_value_get_type
|
||||
lasso_saml2_audience_restriction_get_type
|
||||
lasso_saml2_authn_context_get_type
|
||||
lasso_saml2_authn_statement_get_type
|
||||
lasso_saml2_authz_decision_statement_get_type
|
||||
lasso_saml2_base_idabstract_get_type
|
||||
lasso_saml2_condition_abstract_get_type
|
||||
lasso_saml2_conditions_get_type
|
||||
lasso_saml2_encrypted_element_get_type
|
||||
lasso_saml2_evidence_get_type
|
||||
lasso_saml2_key_info_confirmation_data_get_type
|
||||
lasso_saml2_name_id_get_type
|
||||
lasso_saml2_one_time_use_get_type
|
||||
lasso_saml2_proxy_restriction_get_type
|
||||
lasso_saml2_statement_abstract_get_type
|
||||
lasso_saml2_subject_confirmation_data_get_type
|
||||
lasso_saml2_subject_confirmation_get_type
|
||||
lasso_saml2_subject_get_type
|
||||
lasso_saml2_subject_locality_get_type
|
||||
lasso_saml_advice_get_type
|
||||
lasso_saml_assertion_get_type
|
||||
lasso_saml_attribute_designator_get_type
|
||||
lasso_saml_attribute_get_type
|
||||
lasso_saml_attribute_statement_get_type
|
||||
lasso_saml_attribute_value_get_type
|
||||
lasso_saml_audience_restriction_condition_get_type
|
||||
lasso_saml_authentication_statement_get_type
|
||||
lasso_saml_authority_binding_get_type
|
||||
lasso_saml_condition_abstract_get_type
|
||||
lasso_saml_conditions_get_type
|
||||
lasso_saml_name_identifier_get_type
|
||||
lasso_samlp2_artifact_resolve_get_type
|
||||
lasso_samlp2_artifact_response_get_type
|
||||
lasso_samlp2_assertion_id_request_get_type
|
||||
lasso_samlp2_attribute_query_get_type
|
||||
lasso_samlp2_authn_query_get_type
|
||||
lasso_samlp2_authn_request_get_type
|
||||
lasso_samlp2_authz_decision_query_get_type
|
||||
lasso_samlp2_extensions_get_type
|
||||
lasso_samlp2_idp_entry_get_type
|
||||
lasso_samlp2_idp_list_get_type
|
||||
lasso_samlp2_logout_request_get_type
|
||||
lasso_samlp2_logout_response_get_type
|
||||
lasso_samlp2_manage_name_id_request_get_type
|
||||
lasso_samlp2_manage_name_id_response_get_type
|
||||
lasso_samlp2_name_id_mapping_request_get_type
|
||||
lasso_samlp2_name_id_mapping_response_get_type
|
||||
lasso_samlp2_name_id_policy_get_type
|
||||
lasso_samlp2_request_abstract_get_type
|
||||
lasso_samlp2_requested_authn_context_get_type
|
||||
lasso_samlp2_response_get_type
|
||||
lasso_samlp2_scoping_get_type
|
||||
lasso_samlp2_status_code_get_type
|
||||
lasso_samlp2_status_detail_get_type
|
||||
lasso_samlp2_status_get_type
|
||||
lasso_samlp2_status_response_get_type
|
||||
lasso_samlp2_subject_query_abstract_get_type
|
||||
lasso_samlp2_terminate_get_type
|
||||
lasso_samlp_request_abstract_get_type
|
||||
lasso_samlp_request_get_type
|
||||
lasso_samlp_response_abstract_get_type
|
||||
lasso_samlp_response_get_type
|
||||
lasso_samlp_status_code_get_type
|
||||
lasso_samlp_status_get_type
|
||||
lasso_saml_statement_abstract_get_type
|
||||
lasso_saml_subject_confirmation_get_type
|
||||
lasso_saml_subject_get_type
|
||||
lasso_saml_subject_locality_get_type
|
||||
lasso_saml_subject_statement_abstract_get_type
|
||||
lasso_saml_subject_statement_get_type
|
||||
lasso_server_get_type
|
||||
lasso_session_get_type
|
||||
lasso_soap_body_get_type
|
||||
lasso_soap_detail_get_type
|
||||
lasso_soap_envelope_get_type
|
||||
lasso_soap_fault_get_type
|
||||
lasso_soap_header_get_type
|
|
@ -1,346 +0,0 @@
|
|||
#include <lasso/lasso.h>
|
||||
#include <lasso/xml/xml_idff.h>
|
||||
#include <lasso/xml/saml-2.0/xml_saml2.h>
|
||||
#WSF##include <lasso/id-wsf/id_wsf.h>
|
||||
#WSF##include <lasso/id-wsf-2.0/id_wsf_2.h>
|
||||
#WSF##include <lasso/xml/xml_idwsf.h>
|
||||
|
||||
lasso_assertion_query_get_type
|
||||
lasso_defederation_get_type
|
||||
lasso_ds_key_info_get_type
|
||||
lasso_ds_key_value_get_type
|
||||
lasso_ds_rsa_key_value_get_type
|
||||
lasso_ecp_get_type
|
||||
lasso_federation_get_type
|
||||
lasso_identity_get_type
|
||||
lasso_lecp_get_type
|
||||
lasso_lib_assertion_get_type
|
||||
lasso_lib_authentication_statement_get_type
|
||||
lasso_lib_authn_context_get_type
|
||||
lasso_lib_authn_request_envelope_get_type
|
||||
lasso_lib_authn_request_get_type
|
||||
lasso_lib_authn_response_envelope_get_type
|
||||
lasso_lib_authn_response_get_type
|
||||
lasso_lib_federation_termination_notification_get_type
|
||||
lasso_lib_idp_entries_get_type
|
||||
lasso_lib_idp_entry_get_type
|
||||
lasso_lib_idp_list_get_type
|
||||
lasso_lib_logout_request_get_type
|
||||
lasso_lib_logout_response_get_type
|
||||
lasso_lib_name_identifier_mapping_request_get_type
|
||||
lasso_lib_name_identifier_mapping_response_get_type
|
||||
lasso_lib_register_name_identifier_request_get_type
|
||||
lasso_lib_register_name_identifier_response_get_type
|
||||
lasso_lib_request_authn_context_get_type
|
||||
lasso_lib_scoping_get_type
|
||||
lasso_lib_status_response_get_type
|
||||
lasso_lib_subject_get_type
|
||||
lasso_login_get_type
|
||||
lasso_logout_get_type
|
||||
lasso_misc_text_node_get_type
|
||||
lasso_name_identifier_mapping_get_type
|
||||
lasso_name_id_management_get_type
|
||||
lasso_name_registration_get_type
|
||||
lasso_node_get_type
|
||||
lasso_profile_get_type
|
||||
lasso_provider_get_type
|
||||
lasso_saml2_action_get_type
|
||||
lasso_saml2_advice_get_type
|
||||
lasso_saml2_assertion_get_type
|
||||
lasso_saml2_attribute_get_type
|
||||
lasso_saml2_attribute_statement_get_type
|
||||
lasso_saml2_attribute_value_get_type
|
||||
lasso_saml2_audience_restriction_get_type
|
||||
lasso_saml2_authn_context_get_type
|
||||
lasso_saml2_authn_statement_get_type
|
||||
lasso_saml2_authz_decision_statement_get_type
|
||||
lasso_saml2_base_idabstract_get_type
|
||||
lasso_saml2_condition_abstract_get_type
|
||||
lasso_saml2_conditions_get_type
|
||||
lasso_saml2_encrypted_element_get_type
|
||||
lasso_saml2_evidence_get_type
|
||||
lasso_saml2_key_info_confirmation_data_get_type
|
||||
lasso_saml2_name_id_get_type
|
||||
lasso_saml2_one_time_use_get_type
|
||||
lasso_saml2_proxy_restriction_get_type
|
||||
lasso_saml2_statement_abstract_get_type
|
||||
lasso_saml2_subject_confirmation_data_get_type
|
||||
lasso_saml2_subject_confirmation_get_type
|
||||
lasso_saml2_subject_get_type
|
||||
lasso_saml2_subject_locality_get_type
|
||||
lasso_saml_advice_get_type
|
||||
lasso_saml_assertion_get_type
|
||||
lasso_saml_attribute_designator_get_type
|
||||
lasso_saml_attribute_get_type
|
||||
lasso_saml_attribute_statement_get_type
|
||||
lasso_saml_attribute_value_get_type
|
||||
lasso_saml_audience_restriction_condition_get_type
|
||||
lasso_saml_authentication_statement_get_type
|
||||
lasso_saml_authority_binding_get_type
|
||||
lasso_saml_condition_abstract_get_type
|
||||
lasso_saml_conditions_get_type
|
||||
lasso_saml_name_identifier_get_type
|
||||
lasso_samlp2_artifact_resolve_get_type
|
||||
lasso_samlp2_artifact_response_get_type
|
||||
lasso_samlp2_assertion_id_request_get_type
|
||||
lasso_samlp2_attribute_query_get_type
|
||||
lasso_samlp2_authn_query_get_type
|
||||
lasso_samlp2_authn_request_get_type
|
||||
lasso_samlp2_authz_decision_query_get_type
|
||||
lasso_samlp2_extensions_get_type
|
||||
lasso_samlp2_idp_entry_get_type
|
||||
lasso_samlp2_idp_list_get_type
|
||||
lasso_samlp2_logout_request_get_type
|
||||
lasso_samlp2_logout_response_get_type
|
||||
lasso_samlp2_manage_name_id_request_get_type
|
||||
lasso_samlp2_manage_name_id_response_get_type
|
||||
lasso_samlp2_name_id_mapping_request_get_type
|
||||
lasso_samlp2_name_id_mapping_response_get_type
|
||||
lasso_samlp2_name_id_policy_get_type
|
||||
lasso_samlp2_request_abstract_get_type
|
||||
lasso_samlp2_requested_authn_context_get_type
|
||||
lasso_samlp2_response_get_type
|
||||
lasso_samlp2_scoping_get_type
|
||||
lasso_samlp2_status_code_get_type
|
||||
lasso_samlp2_status_detail_get_type
|
||||
lasso_samlp2_status_get_type
|
||||
lasso_samlp2_status_response_get_type
|
||||
lasso_samlp2_subject_query_abstract_get_type
|
||||
lasso_samlp2_terminate_get_type
|
||||
lasso_samlp_request_abstract_get_type
|
||||
lasso_samlp_request_get_type
|
||||
lasso_samlp_response_abstract_get_type
|
||||
lasso_samlp_response_get_type
|
||||
lasso_samlp_status_code_get_type
|
||||
lasso_samlp_status_get_type
|
||||
lasso_saml_statement_abstract_get_type
|
||||
lasso_saml_subject_confirmation_get_type
|
||||
lasso_saml_subject_get_type
|
||||
lasso_saml_subject_locality_get_type
|
||||
lasso_saml_subject_statement_abstract_get_type
|
||||
lasso_saml_subject_statement_get_type
|
||||
lasso_server_get_type
|
||||
lasso_session_get_type
|
||||
lasso_soap_body_get_type
|
||||
lasso_soap_detail_get_type
|
||||
lasso_soap_envelope_get_type
|
||||
lasso_soap_fault_get_type
|
||||
lasso_soap_header_get_type
|
||||
#WSF#lasso_authentication_get_type
|
||||
#WSF#lasso_data_service_get_type
|
||||
#WSF#lasso_disco_authenticate_requester_get_type
|
||||
#WSF#lasso_disco_authenticate_session_context_get_type
|
||||
#WSF#lasso_disco_authorize_requester_get_type
|
||||
#WSF#lasso_disco_credentials_get_type
|
||||
#WSF#lasso_disco_description_get_type
|
||||
#WSF#lasso_disco_encrypted_resource_id_get_type
|
||||
#WSF#lasso_disco_encrypt_resource_id_get_type
|
||||
#WSF#lasso_disco_generate_bearer_token_get_type
|
||||
#WSF#lasso_disco_insert_entry_get_type
|
||||
#WSF#lasso_disco_modify_get_type
|
||||
#WSF#lasso_disco_modify_response_get_type
|
||||
#WSF#lasso_disco_options_get_type
|
||||
#WSF#lasso_disco_query_get_type
|
||||
#WSF#lasso_disco_query_response_get_type
|
||||
#WSF#lasso_disco_remove_entry_get_type
|
||||
#WSF#lasso_disco_requested_service_type_get_type
|
||||
#WSF#lasso_disco_resource_id_get_type
|
||||
#WSF#lasso_disco_resource_offering_get_type
|
||||
#WSF#lasso_disco_send_single_logout_get_type
|
||||
#WSF#lasso_disco_service_instance_get_type
|
||||
#WSF#lasso_discovery_get_type
|
||||
#WSF#lasso_dst_data_get_type
|
||||
#WSF#lasso_dst_modification_get_type
|
||||
#WSF#lasso_dst_modify_get_type
|
||||
#WSF#lasso_dst_modify_response_get_type
|
||||
#WSF#lasso_dst_new_data_get_type
|
||||
#WSF#lasso_dst_query_get_type
|
||||
#WSF#lasso_dst_query_item_get_type
|
||||
#WSF#lasso_dst_query_response_get_type
|
||||
#WSF#lasso_idwsf2_data_service_get_type
|
||||
#WSF#lasso_idwsf2_disco_abstract_get_type
|
||||
#WSF#lasso_idwsf2_disco_endpoint_context_get_type
|
||||
#WSF#lasso_idwsf2_disco_keys_get_type
|
||||
#WSF#lasso_idwsf2_disco_options_get_type
|
||||
#WSF#lasso_idwsf2_disco_provider_id_get_type
|
||||
#WSF#lasso_idwsf2_disco_query_get_type
|
||||
#WSF#lasso_idwsf2_disco_query_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_requested_service_get_type
|
||||
#WSF#lasso_idwsf2_disco_security_context_get_type
|
||||
#WSF#lasso_idwsf2_disco_service_context_get_type
|
||||
#WSF#lasso_idwsf2_disco_service_type_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_association_add_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_association_add_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_association_delete_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_association_delete_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_association_query_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_association_query_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_delete_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_delete_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_query_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_query_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_register_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_register_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_replace_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_md_replace_response_get_type
|
||||
#WSF#lasso_idwsf2_disco_svc_metadata_get_type
|
||||
#WSF#lasso_idwsf2_discovery_get_type
|
||||
#WSF#lasso_idwsf2_dst_data_response_base_get_type
|
||||
#WSF#lasso_idwsf2_dst_delete_item_base_get_type
|
||||
#WSF#lasso_idwsf2_dst_delete_response_get_type
|
||||
#WSF#lasso_idwsf2_dstref_app_data_get_type
|
||||
#WSF#lasso_idwsf2_dstref_create_get_type
|
||||
#WSF#lasso_idwsf2_dstref_create_item_get_type
|
||||
#WSF#lasso_idwsf2_dstref_create_response_get_type
|
||||
#WSF#lasso_idwsf2_dstref_data_get_type
|
||||
#WSF#lasso_idwsf2_dstref_data_response_get_type
|
||||
#WSF#lasso_idwsf2_dstref_delete_get_type
|
||||
#WSF#lasso_idwsf2_dstref_delete_item_get_type
|
||||
#WSF#lasso_idwsf2_dstref_delete_response_get_type
|
||||
#WSF#lasso_idwsf2_dstref_item_data_get_type
|
||||
#WSF#lasso_idwsf2_dstref_modify_get_type
|
||||
#WSF#lasso_idwsf2_dstref_modify_item_get_type
|
||||
#WSF#lasso_idwsf2_dstref_modify_response_get_type
|
||||
#WSF#lasso_idwsf2_dstref_query_get_type
|
||||
#WSF#lasso_idwsf2_dstref_query_item_get_type
|
||||
#WSF#lasso_idwsf2_dstref_query_response_get_type
|
||||
#WSF#lasso_idwsf2_dstref_result_query_get_type
|
||||
#WSF#lasso_idwsf2_dstref_test_item_get_type
|
||||
#WSF#lasso_idwsf2_dst_request_get_type
|
||||
#WSF#lasso_idwsf2_dst_result_query_base_get_type
|
||||
#WSF#lasso_idwsf2_dst_test_item_base_get_type
|
||||
#WSF#lasso_idwsf2_ims_identity_mapping_request_get_type
|
||||
#WSF#lasso_idwsf2_ims_identity_mapping_response_get_type
|
||||
#WSF#lasso_idwsf2_ims_mapping_input_get_type
|
||||
#WSF#lasso_idwsf2_ims_mapping_output_get_type
|
||||
#WSF#lasso_idwsf2_is_help_get_type
|
||||
#WSF#lasso_idwsf2_is_inquiry_element_get_type
|
||||
#WSF#lasso_idwsf2_is_inquiry_get_type
|
||||
#WSF#lasso_idwsf2_is_interaction_request_get_type
|
||||
#WSF#lasso_idwsf2_is_interaction_response_get_type
|
||||
#WSF#lasso_idwsf2_is_interaction_statement_get_type
|
||||
#WSF#lasso_idwsf2_is_item_get_type
|
||||
#WSF#lasso_idwsf2_is_parameter_get_type
|
||||
#WSF#lasso_idwsf2_is_select_get_type
|
||||
#WSF#lasso_idwsf2_is_text_get_type
|
||||
#WSF#lasso_idwsf2_profile_get_type
|
||||
#WSF#lasso_idwsf2_ps_add_collection_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_add_collection_response_get_type
|
||||
#WSF#lasso_idwsf2_ps_add_entity_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_add_entity_response_get_type
|
||||
#WSF#lasso_idwsf2_ps_add_known_entity_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_add_known_entity_response_get_type
|
||||
#WSF#lasso_idwsf2_ps_add_to_collection_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_get_object_info_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_get_object_info_response_get_type
|
||||
#WSF#lasso_idwsf2_ps_item_data_get_type
|
||||
#WSF#lasso_idwsf2_ps_list_members_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_list_members_response_get_type
|
||||
#WSF#lasso_idwsf2_ps_notification_get_type
|
||||
#WSF#lasso_idwsf2_ps_notify_get_type
|
||||
#WSF#lasso_idwsf2_ps_object_get_type
|
||||
#WSF#lasso_idwsf2_ps_query_objects_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_query_objects_response_get_type
|
||||
#WSF#lasso_idwsf2_ps_remove_collection_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_remove_entity_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_remove_from_collection_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_request_abstract_get_type
|
||||
#WSF#lasso_idwsf2_ps_resolve_identifier_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_resolve_identifier_response_get_type
|
||||
#WSF#lasso_idwsf2_ps_resolve_input_get_type
|
||||
#WSF#lasso_idwsf2_ps_response_abstract_get_type
|
||||
#WSF#lasso_idwsf2_ps_set_object_info_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_test_membership_request_get_type
|
||||
#WSF#lasso_idwsf2_ps_test_membership_response_get_type
|
||||
#WSF#lasso_idwsf2_sb2_consent_get_type
|
||||
#WSF#lasso_idwsf2_sb2_credentials_context_get_type
|
||||
#WSF#lasso_idwsf2_sb2_endpoint_update_get_type
|
||||
#WSF#lasso_idwsf2_sb2_redirect_request_get_type
|
||||
#WSF#lasso_idwsf2_sb2_sender_get_type
|
||||
#WSF#lasso_idwsf2_sb2_target_identity_get_type
|
||||
#WSF#lasso_idwsf2_sb2_timeout_get_type
|
||||
#WSF#lasso_idwsf2_sb2_usage_directive_get_type
|
||||
#WSF#lasso_idwsf2_sb2_user_interaction_header_get_type
|
||||
#WSF#lasso_idwsf2_sbf_framework_get_type
|
||||
#WSF#lasso_idwsf2_sec_token_get_type
|
||||
#WSF#lasso_idwsf2_sec_token_policy_get_type
|
||||
#WSF#lasso_idwsf2_sec_transited_provider_path_get_type
|
||||
#WSF#lasso_idwsf2_subs_notification_get_type
|
||||
#WSF#lasso_idwsf2_subs_notify_response_get_type
|
||||
#WSF#lasso_idwsf2_subsref_app_data_get_type
|
||||
#WSF#lasso_idwsf2_subsref_create_get_type
|
||||
#WSF#lasso_idwsf2_subsref_create_item_get_type
|
||||
#WSF#lasso_idwsf2_subsref_create_response_get_type
|
||||
#WSF#lasso_idwsf2_subsref_data_get_type
|
||||
#WSF#lasso_idwsf2_subsref_data_response_get_type
|
||||
#WSF#lasso_idwsf2_subsref_delete_get_type
|
||||
#WSF#lasso_idwsf2_subsref_delete_item_get_type
|
||||
#WSF#lasso_idwsf2_subsref_delete_response_get_type
|
||||
#WSF#lasso_idwsf2_subsref_item_data_get_type
|
||||
#WSF#lasso_idwsf2_subs_ref_item_get_type
|
||||
#WSF#lasso_idwsf2_subsref_modify_get_type
|
||||
#WSF#lasso_idwsf2_subsref_modify_item_get_type
|
||||
#WSF#lasso_idwsf2_subsref_modify_response_get_type
|
||||
#WSF#lasso_idwsf2_subsref_notification_get_type
|
||||
#WSF#lasso_idwsf2_subsref_notify_get_type
|
||||
#WSF#lasso_idwsf2_subsref_notify_response_get_type
|
||||
#WSF#lasso_idwsf2_subsref_query_get_type
|
||||
#WSF#lasso_idwsf2_subsref_query_item_get_type
|
||||
#WSF#lasso_idwsf2_subsref_query_response_get_type
|
||||
#WSF#lasso_idwsf2_subsref_result_query_get_type
|
||||
#WSF#lasso_idwsf2_subsref_subscription_get_type
|
||||
#WSF#lasso_idwsf2_subsref_test_item_get_type
|
||||
#WSF#lasso_idwsf2_subs_subscription_get_type
|
||||
#WSF#lasso_idwsf2_util_empty_get_type
|
||||
#WSF#lasso_idwsf2_util_extension_get_type
|
||||
#WSF#lasso_idwsf2_util_response_get_type
|
||||
#WSF#lasso_idwsf2_util_status_get_type
|
||||
#WSF#lasso_interaction_profile_service_get_type
|
||||
#WSF#lasso_is_help_get_type
|
||||
#WSF#lasso_is_inquiry_element_get_type
|
||||
#WSF#lasso_is_inquiry_get_type
|
||||
#WSF#lasso_is_interaction_request_get_type
|
||||
#WSF#lasso_is_interaction_response_get_type
|
||||
#WSF#lasso_is_interaction_statement_get_type
|
||||
#WSF#lasso_is_item_get_type
|
||||
#WSF#lasso_is_parameter_get_type
|
||||
#WSF#lasso_is_redirect_request_get_type
|
||||
#WSF#lasso_is_select_get_type
|
||||
#WSF#lasso_is_text_get_type
|
||||
#WSF#lasso_is_user_interaction_get_type
|
||||
#WSF#lasso_personal_profile_service_get_type
|
||||
#WSF#lasso_sa_credentials_get_type
|
||||
#WSF#lasso_sa_parameter_get_type
|
||||
#WSF#lasso_sa_password_transforms_get_type
|
||||
#WSF#lasso_sa_sasl_request_get_type
|
||||
#WSF#lasso_sa_sasl_response_get_type
|
||||
#WSF#lasso_sa_transform_get_type
|
||||
#WSF#lasso_sec_resource_access_statement_get_type
|
||||
#WSF#lasso_soap_binding_consent_get_type
|
||||
#WSF#lasso_soap_binding_correlation_get_type
|
||||
#WSF#lasso_soap_binding_ext_credential_get_type
|
||||
#WSF#lasso_soap_binding_ext_credentials_context_get_type
|
||||
#WSF#lasso_soap_binding_ext_service_instance_update_get_type
|
||||
#WSF#lasso_soap_binding_ext_timeout_get_type
|
||||
#WSF#lasso_soap_binding_processing_context_get_type
|
||||
#WSF#lasso_soap_binding_provider_get_type
|
||||
#WSF#lasso_soap_binding_usage_directive_get_type
|
||||
#WSF#lasso_utility_status_get_type
|
||||
#WSF#lasso_wsa_attributed_any_get_type
|
||||
#WSF#lasso_wsa_attributed_qname_get_type
|
||||
#WSF#lasso_wsa_attributed_unsigned_long_get_type
|
||||
#WSF#lasso_wsa_attributed_uri_get_type
|
||||
#WSF#lasso_wsa_endpoint_reference_get_type
|
||||
#WSF#lasso_wsa_metadata_get_type
|
||||
#WSF#lasso_wsa_problem_action_get_type
|
||||
#WSF#lasso_wsa_reference_parameters_get_type
|
||||
#WSF#lasso_wsa_relates_to_get_type
|
||||
#WSF#lasso_wsf_profile_get_type
|
||||
#WSF#lasso_wsse_embedded_get_type
|
||||
#WSF#lasso_wsse_reference_get_type
|
||||
#WSF#lasso_wsse_security_get_type
|
||||
#WSF#lasso_wsse_security_header_get_type
|
||||
#WSF#lasso_wsse_security_token_reference_get_type
|
||||
#WSF#lasso_wsse_transformation_parameters_get_type
|
||||
#WSF#lasso_wsse_username_token_get_type
|
||||
#WSF#lasso_wsu_timestamp_get_type
|
|
@ -13,7 +13,7 @@
|
|||
Lasso (Liberty Alliance Single Sign On) is a free (GNU GPL) implementation
|
||||
of the Liberty Alliance specifications. Those define protocols for
|
||||
federated identities, single sign-on, etc. Lasso supports ID-FF 1.2,
|
||||
SAML 2.0 and parts of ID-WSF; it provides both a C library and bindings
|
||||
SAML 2.0; it provides both a C library and bindings
|
||||
for several languages (Python, Java, Perl, PHP 4 and PHP 5).
|
||||
</description>
|
||||
<shortdesc>Free Software implementation of Liberty Alliance specifications</shortdesc>
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
SUBDIRS = xml id-ff saml-2.0
|
||||
if WSF_ENABLED
|
||||
SUBDIRS += id-wsf-2.0 id-wsf
|
||||
endif
|
||||
|
||||
liblassoincludedir = $(includedir)/lasso
|
||||
|
||||
|
@ -25,10 +22,6 @@ BUILT_SOURCES = types.c errors.c symbols.sym
|
|||
|
||||
liblasso_la_SOURCES = lasso.c errors.c registry.c utils.c logging.c key.c
|
||||
|
||||
if WSF_ENABLED
|
||||
SYMBOLS_ARGS = -wsf
|
||||
endif
|
||||
|
||||
types.c: $(srcdir)/*.h $(srcdir)/*/*.h $(srcdir)/*/*/*.h
|
||||
$(PYTHON) $(srcdir)/extract_types.py $(srcdir) $(SYMBOLS_ARGS)
|
||||
|
||||
|
@ -45,14 +38,6 @@ clean-local:
|
|||
EXTRA_DIST = $(nodist_liblassoinclude_HEADERS) extract_types.py extract_symbols.py build_strerror.py \
|
||||
errors.c.in extract_sections.py errors.c
|
||||
|
||||
if WSF_ENABLED
|
||||
WSF_LIB_FILE = $(top_builddir)/lasso/id-wsf/liblasso-id-wsf.la
|
||||
|
||||
WSF2_LIB_FILES = $(top_builddir)/lasso/id-wsf-2.0/liblasso-id-wsf2.la \
|
||||
$(top_builddir)/lasso/xml/id-wsf-2.0/liblasso-xml-id-wsf-2.la \
|
||||
$(top_builddir)/lasso/xml/ws/liblasso-xml-ws.la
|
||||
endif
|
||||
|
||||
if MINGW
|
||||
liblasso_la_LIBADD = \
|
||||
$(top_builddir)/lasso/xml/liblasso-xml.la \
|
||||
|
@ -62,8 +47,6 @@ liblasso_la_LIBADD = \
|
|||
$(top_builddir)/lasso/xml/dsig/liblasso-xml-dsig.la \
|
||||
$(top_builddir)/lasso/id-ff/liblasso-id-ff.la \
|
||||
$(top_builddir)/lasso/saml-2.0/liblasso-saml-20.la \
|
||||
$(WSF_LIB_FILE) \
|
||||
$(WSF2_LIB_FILES) \
|
||||
$(LASSO_LIBS) \
|
||||
lasso.rc.lo
|
||||
# Just make damn sure the ABI stays the same between
|
||||
|
@ -80,8 +63,6 @@ liblasso_la_LIBADD = \
|
|||
$(top_builddir)/lasso/xml/dsig/liblasso-xml-dsig.la \
|
||||
$(top_builddir)/lasso/id-ff/liblasso-id-ff.la \
|
||||
$(top_builddir)/lasso/saml-2.0/liblasso-saml-20.la \
|
||||
$(WSF_LIB_FILE) \
|
||||
$(WSF2_LIB_FILES) \
|
||||
$(LASSO_LIBS)
|
||||
# Just make damn sure the ABI stays the same between
|
||||
# upgrades.
|
||||
|
|
282
lasso/errors.h
282
lasso/errors.h
|
@ -783,206 +783,6 @@ LASSO_EXPORT const char* lasso_strerror(int error_code);
|
|||
#define LASSO_NAME_IDENTIFIER_MAPPING_ERROR_FORBIDDEN_CALL_ON_THIS_SIDE -901
|
||||
#define LASSO_NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_IDENTIFIER -902
|
||||
|
||||
/* Data Service */
|
||||
#define LASSO_DATA_SERVICE_ERROR_UNREGISTERED_DST -1000
|
||||
#define LASSO_DATA_SERVICE_ERROR_CANNOT_ADD_ITEM -1001
|
||||
|
||||
/* WSF Profile */
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_CORRELATION:
|
||||
*
|
||||
* Correlation SOAP Header is missing
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_CORRELATION -1100
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_SECURITY:
|
||||
*
|
||||
* Security SOAP Header is missing
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_SECURITY -1101
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_ASSERTION_ID:
|
||||
*
|
||||
* AssertionID attribute is missing
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_ASSERTION_ID -1102
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_ENDPOINT:
|
||||
*
|
||||
* Cannot find an WSP endpoint for the ID-WSF service
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_ENDPOINT -1103
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_SOAP_FAULT:
|
||||
*
|
||||
* SOAP ID-WSF binding returned a SOAP fault
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_SOAP_FAULT 1104
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_UNSUPPORTED_SECURITY_MECHANISM:
|
||||
*
|
||||
* The specified security mechanism is not supported by lasso ID-WSF library
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_UNSUPPORTED_SECURITY_MECHANISM 1105
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_DESCRIPTION:
|
||||
*
|
||||
* No ID-WSF web Service description could be found for the current security mechanism
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_DESCRIPTION -1106
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_RESOURCE_ID:
|
||||
*
|
||||
* The necessary ResourceID or EncryptedResourceID for calling an ID-WSF service is missing.
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_RESOURCE_ID -1107
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_CREDENTIAL_REF:
|
||||
*
|
||||
* WS-Security SAML Token secmech needs a CredentialRef
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_CREDENTIAL_REF -1108
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_INVALID_OR_MISSING_REFERENCE_TO_MESSAGE_ID:
|
||||
*
|
||||
* refToMessageID attribute of the Corrrelation header does not match the SOAP request
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_INVALID_OR_MISSING_REFERENCE_TO_MESSAGE_ID -1109
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_SECURITY_MECHANISM_CHECK_FAILED:
|
||||
*
|
||||
* Check for a security mechanism upon a received request failed.
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_SECURITY_MECHANISM_CHECK_FAILED 1110
|
||||
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_UNKNOWN_STATUS_CODE:
|
||||
*
|
||||
* A response contained an unknown status code.
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_UNKNOWN_STATUS_CODE 1112
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED:
|
||||
*
|
||||
* A interaction is required but the sender did not allow use to make interact redirect requests.
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED 1113
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED_FOR_DATA:
|
||||
*
|
||||
* A interaction is required to get fresh datas but the sender did not allow use to make interact
|
||||
* redirect requests.
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED_FOR_DATA 1114
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST:
|
||||
*
|
||||
* The last parsed response contained a SOAP fault with a RedirectRequest element.
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST 1115
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER:
|
||||
*
|
||||
* The requester does not support SOAP Fault containing RedirectRequest elements. So it is not
|
||||
* possible to use lasso_idwsf2_profile_redirect_user_for_interaction().
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER 1116
|
||||
/**
|
||||
* LASSO_WSF_PROFILE_ERROR_MISSING_SENDER_ID:
|
||||
*
|
||||
* The received ID-WSF request miss a Sender id.
|
||||
*/
|
||||
#define LASSO_WSF_PROFILE_ERROR_MISSING_SENDER_ID 1117
|
||||
|
||||
|
||||
/* ID-WSF 2 Discovery */
|
||||
/**
|
||||
* LASSO_DISCOVERY_ERROR_SVC_METADATA_REGISTER_FAILED:
|
||||
*
|
||||
* Service metadata registration failed
|
||||
*/
|
||||
#define LASSO_DISCOVERY_ERROR_SVC_METADATA_REGISTER_FAILED -1200
|
||||
/**
|
||||
* LASSO_DISCOVERY_ERROR_SVC_METADATA_ASSOCIATION_ADD_FAILED:
|
||||
*
|
||||
* Service metadata association failed
|
||||
*/
|
||||
#define LASSO_DISCOVERY_ERROR_SVC_METADATA_ASSOCIATION_ADD_FAILED -1201
|
||||
/**
|
||||
* LASSO_DISCOVERY_ERROR_MISSING_REQUESTED_SERVICE:
|
||||
*
|
||||
* Missing requested service
|
||||
*/
|
||||
#define LASSO_DISCOVERY_ERROR_MISSING_REQUESTED_SERVICE -1202
|
||||
/**
|
||||
* LASSO_DISCOVERY_ERROR_FAILED_TO_BUILD_ENDPOINT_REFERENCE:
|
||||
*
|
||||
* Failed to build Endpoint Reference
|
||||
*/
|
||||
#define LASSO_DISCOVERY_ERROR_FAILED_TO_BUILD_ENDPOINT_REFERENCE -1203
|
||||
|
||||
/* ID-WSF 2 Data Service */
|
||||
/**
|
||||
* LASSO_DST_ERROR_MISSING_SERVICE_DATA:
|
||||
*
|
||||
* Missing service data
|
||||
*/
|
||||
#define LASSO_DST_ERROR_MISSING_SERVICE_DATA -1300
|
||||
/**
|
||||
* LASSO_DST_ERROR_QUERY_FAILED:
|
||||
*
|
||||
* Query failed
|
||||
*/
|
||||
#define LASSO_DST_ERROR_QUERY_FAILED -1301
|
||||
/**
|
||||
* LASSO_DST_ERROR_QUERY_PARTIALLY_FAILED:
|
||||
*
|
||||
* Query partially failed : some items were correctly processed
|
||||
*/
|
||||
#define LASSO_DST_ERROR_QUERY_PARTIALLY_FAILED -1302
|
||||
/**
|
||||
* LASSO_DST_ERROR_MODIFY_FAILED:
|
||||
*
|
||||
* Modify failed
|
||||
*/
|
||||
#define LASSO_DST_ERROR_MODIFY_FAILED -1303
|
||||
/**
|
||||
* LASSO_DST_ERROR_MODIFY_PARTIALLY_FAILED:
|
||||
*
|
||||
* Modify partially failed : some items were correctly processed
|
||||
*/
|
||||
#define LASSO_DST_ERROR_MODIFY_PARTIALLY_FAILED -1304
|
||||
/**
|
||||
* LASSO_DST_ERROR_NEW_DATA_MISSING:
|
||||
*
|
||||
* Missing new data
|
||||
*/
|
||||
#define LASSO_DST_ERROR_NEW_DATA_MISSING -1305
|
||||
/**
|
||||
* LASSO_DST_ERROR_QUERY_NOT_FOUND:
|
||||
*
|
||||
* Looked query is not found
|
||||
*/
|
||||
#define LASSO_DST_ERROR_QUERY_NOT_FOUND -1306
|
||||
/**
|
||||
* LASSO_DST_ERROR_NO_DATA:
|
||||
*
|
||||
* No data or no data for the designated query item in the query response
|
||||
*/
|
||||
#define LASSO_DST_ERROR_NO_DATA -1307
|
||||
/**
|
||||
* LASSO_DST_ERROR_MALFORMED_QUERY:
|
||||
*
|
||||
* QueryObject is malformed
|
||||
*/
|
||||
#define LASSO_DST_ERROR_MALFORMED_QUERY -1308
|
||||
/**
|
||||
* LASSO_DST_ERROR_EMPTY_REQUEST
|
||||
*
|
||||
* Request is empty.
|
||||
*/
|
||||
#define LASSO_DST_ERROR_EMPTY_REQUEST -1309
|
||||
|
||||
/* Lasso registry */
|
||||
/**
|
||||
* LASSO_REGISTRY_ERROR_KEY_EXISTS:
|
||||
|
@ -999,88 +799,6 @@ LASSO_EXPORT const char* lasso_strerror(int error_code);
|
|||
*/
|
||||
#define LASSO_PROVIDER_ERROR_MISSING_PUBLIC_KEY -1500
|
||||
|
||||
/* WS-Security */
|
||||
/**
|
||||
* LASSO_WSSEC_ERROR_MISSING_SECURITY_TOKEN:
|
||||
*
|
||||
* The request miss a WS-Security token.
|
||||
*/
|
||||
#define LASSO_WSSEC_ERROR_MISSING_SECURITY_TOKEN 1600
|
||||
|
||||
/**
|
||||
* LASSO_WSSEC_ERROR_BAD_PASSWORD:
|
||||
*
|
||||
* The known password does not match the UsernameToken
|
||||
*/
|
||||
#define LASSO_WSSEC_ERROR_BAD_PASSWORD 1601
|
||||
|
||||
/* ID-WSF 2.0 Discovery Service */
|
||||
/**
|
||||
* LASSO_IDWSF2_DISCOVERY_ERROR_FAILED:
|
||||
*
|
||||
* Last discovery request failed.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DISCOVERY_ERROR_FAILED 1700
|
||||
/**
|
||||
* LASSO_IDWSF2_DISCOVERY_ERROR_FORBIDDEN:
|
||||
*
|
||||
* Last discovery request is forbidden by policy.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DISCOVERY_ERROR_FORBIDDEN 1701
|
||||
/**
|
||||
* LASSO_IDWSF2_DISCOVERY_ERROR_DUPLICATE:
|
||||
*
|
||||
* Last discovery request was denied because it would result in duplicate data in the service
|
||||
*/
|
||||
#define LASSO_IDWSF2_DISCOVERY_ERROR_DUPLICATE 1702
|
||||
/**
|
||||
* LASSO_IDWSF2_DISCOVERY_ERROR_LOGICAL_DUPLICATE:
|
||||
*
|
||||
* Last discovery request was denied because it would result in logically duplicate data in the service
|
||||
*/
|
||||
#define LASSO_IDWSF2_DISCOVERY_ERROR_LOGICAL_DUPLICATE 1703
|
||||
/**
|
||||
* LASSO_IDWSF2_DISCOVERY_ERROR_NO_RESULTS:
|
||||
*
|
||||
* The discovery query had no matching results.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DISCOVERY_ERROR_NO_RESULTS 1704
|
||||
/**
|
||||
* LASSO_IDWSF2_DISCOVERY_ERROR_NOT_FOUND:
|
||||
*
|
||||
* The specified item(s) were not found.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DISCOVERY_ERROR_NOT_FOUND 1705
|
||||
|
||||
/* ID-WSF 2.0 Data Service Template */
|
||||
|
||||
/**
|
||||
* LASSO_IDWSF2_DST_ERROR_DUPLICATE_ITEM:
|
||||
*
|
||||
* A call to add a new item would result in duplicate items.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DST_ERROR_DUPLICATE_ITEM -1801
|
||||
|
||||
/**
|
||||
* LASSO_IDWSF2_DST_ERROR_PARTIAL_FAILURE:
|
||||
*
|
||||
* Server responded with a partial failure status code.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DST_ERROR_PARTIAL_FAILURE 1802
|
||||
|
||||
/**
|
||||
* LASSO_IDWSF2_DST_ERROR_UNKNOWN_STATUS_CODE:
|
||||
*
|
||||
* Server response with an unknown status code.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DST_ERROR_UNKNOWN_STATUS_CODE 1803
|
||||
/**
|
||||
* LASSO_IDWSF2_DST_ERROR_ITEM_NOT_FOUND:
|
||||
*
|
||||
* The item_id was not found in the current query request.
|
||||
*/
|
||||
#define LASSO_IDWSF2_DST_ERROR_ITEM_NOT_FOUND 1804
|
||||
|
||||
/**
|
||||
* LASSO_ASSERTION_QUERY_ERROR_ATTRIBUTE_REQUEST_ALREADY_EXIST:
|
||||
*
|
||||
|
|
|
@ -7,12 +7,7 @@ import os
|
|||
import os.path
|
||||
from six import print_
|
||||
|
||||
enable_wsf = False
|
||||
|
||||
if '-wsf' in sys.argv:
|
||||
enable_wsf = True
|
||||
|
||||
if len(sys.argv) == 2+enable_wsf:
|
||||
if len(sys.argv) == 2:
|
||||
srcdir = sys.argv[1]
|
||||
else:
|
||||
srcdir = '.'
|
||||
|
|
|
@ -6,12 +6,7 @@ import re
|
|||
import sys
|
||||
import six
|
||||
|
||||
enable_wsf = False
|
||||
|
||||
if '-wsf' in sys.argv:
|
||||
enable_wsf = True
|
||||
|
||||
if len(sys.argv) == 2+enable_wsf:
|
||||
if len(sys.argv) == 2:
|
||||
srcdir = sys.argv[1]
|
||||
else:
|
||||
srcdir = '.'
|
||||
|
@ -21,22 +16,9 @@ regex = re.compile('LASSO_EXPORT[^;(]*(lasso_[a-zA-Z0-9_]+)', re.MULTILINE)
|
|||
symbols = []
|
||||
for header_file in glob.glob('%s/*/*.h' % srcdir) + glob.glob('%s/*.h' % srcdir) + \
|
||||
glob.glob('%s/*/*/*.h' % srcdir):
|
||||
if ('/id-wsf/' in header_file or '/id-wsf-2.0' in header_file) and not enable_wsf:
|
||||
continue
|
||||
assert not ('/id-wsf/' in header_file or '/id-wsf-2.0' in header_file)
|
||||
symbols.extend(regex.findall(io.open(header_file, encoding='utf-8').read().replace('\\\n', '')))
|
||||
|
||||
wsf = ['lasso_disco_', 'lasso_dst_', 'lasso_is_', 'lasso_profile_service_',
|
||||
'lasso_discovery', 'lasso_wsf', 'lasso_interaction_', 'lasso_utility_',
|
||||
'lasso_sa_', 'lasso_soap_binding', 'lasso_authentication', 'lasso_wsse_',
|
||||
'lasso_sec_', 'lasso_idwsf2', 'lasso_wsf2', 'lasso_wsa_',
|
||||
'lasso_wsu_']
|
||||
if enable_wsf:
|
||||
wsf = []
|
||||
|
||||
for s in symbols:
|
||||
for t in wsf:
|
||||
if s.startswith(t):
|
||||
break
|
||||
else:
|
||||
six.print_(s)
|
||||
|
||||
|
|
|
@ -6,23 +6,11 @@ import re
|
|||
import sys
|
||||
import six
|
||||
|
||||
enable_wsf = 0
|
||||
|
||||
if '-wsf' in sys.argv:
|
||||
enable_wsf = 1
|
||||
|
||||
if len(sys.argv) == 2+enable_wsf:
|
||||
if len(sys.argv) == 2:
|
||||
srcdir = sys.argv[1]
|
||||
else:
|
||||
srcdir = '.'
|
||||
|
||||
wsf = ['lasso_disco_', 'lasso_dst_', 'lasso_is_', 'lasso_profile_service_',
|
||||
'lasso_discovery', 'lasso_wsf', 'lasso_interaction_', 'lasso_utility_',
|
||||
'lasso_sa_', 'lasso_soap_binding', 'lasso_authentication', 'lasso_wsse_',
|
||||
'lasso_sec_', 'lasso_idwsf2', 'lasso_wsf2', 'lasso_wsa_',
|
||||
'lasso_wsu_']
|
||||
if enable_wsf:
|
||||
wsf = []
|
||||
|
||||
fd = io.StringIO()
|
||||
|
||||
|
@ -33,17 +21,12 @@ six.print_(u"", file=fd)
|
|||
|
||||
header_files = []
|
||||
for header_file in sorted(glob.glob('%s/*/*.h' % srcdir) + glob.glob('%s/*/*/*.h' % srcdir)):
|
||||
if ('/id-wsf/' in header_file or '/id-wsf-2.0' in header_file) and not enable_wsf:
|
||||
continue
|
||||
assert not ('/id-wsf/' in header_file or '/id-wsf-2.0' in header_file)
|
||||
header_files.append(header_file)
|
||||
try:
|
||||
type = re.findall('lasso_.*get_type', io.open(header_file, encoding='utf-8').read())[0]
|
||||
except IndexError:
|
||||
continue
|
||||
for t in wsf:
|
||||
if type.startswith(t):
|
||||
break
|
||||
else:
|
||||
six.print_("extern GType %s();" % type, file=fd)
|
||||
|
||||
six.print_(u"", file=fd)
|
||||
|
@ -53,10 +36,6 @@ for header_file in header_files:
|
|||
type = re.findall('lasso_.*get_type', io.open(header_file, encoding='utf-8').read())[0]
|
||||
except IndexError:
|
||||
continue
|
||||
for t in wsf:
|
||||
if type.startswith(t):
|
||||
break
|
||||
else:
|
||||
six.print_(u"\t%s," % type, file=fd)
|
||||
six.print_(u"\tNULL", file=fd)
|
||||
six.print_(u"};", file=fd)
|
||||
|
|
|
@ -35,10 +35,6 @@
|
|||
#include "../utils.h"
|
||||
#include "identity.h"
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
#include "../id-wsf/id_ff_extensions.h"
|
||||
#endif
|
||||
|
||||
#include "identityprivate.h"
|
||||
#include "../lasso_config.h"
|
||||
|
||||
|
@ -144,22 +140,11 @@ add_childnode_from_hashtable(G_GNUC_UNUSED gchar *key, LassoNode *value, xmlNode
|
|||
xmlAddChild(xmlnode, lasso_node_get_xmlNode(LASSO_NODE(value), TRUE));
|
||||
}
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
static void
|
||||
add_text_childnode_from_list(gchar *value, xmlNode *xmlnode)
|
||||
{
|
||||
xmlNewTextChild(xmlnode, NULL, (xmlChar*)"SvcMDID", (xmlChar*)value);
|
||||
}
|
||||
#endif
|
||||
|
||||
static xmlNode*
|
||||
get_xmlNode(LassoNode *node, G_GNUC_UNUSED gboolean lasso_dump)
|
||||
{
|
||||
xmlNode *xmlnode;
|
||||
LassoIdentity *identity = LASSO_IDENTITY(node);
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
xmlNode *t;
|
||||
#endif
|
||||
|
||||
xmlnode = xmlNewNode(NULL, (xmlChar*)"Identity");
|
||||
xmlSetNs(xmlnode, xmlNewNs(xmlnode, (xmlChar*)LASSO_LASSO_HREF, NULL));
|
||||
|
@ -169,19 +154,6 @@ get_xmlNode(LassoNode *node, G_GNUC_UNUSED gboolean lasso_dump)
|
|||
if (g_hash_table_size(identity->federations))
|
||||
g_hash_table_foreach(identity->federations,
|
||||
(GHFunc)add_childnode_from_hashtable, xmlnode);
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
/* Resource Offerings */
|
||||
g_hash_table_foreach(identity->private_data->resource_offerings_map,
|
||||
(GHFunc)add_childnode_from_hashtable, xmlnode);
|
||||
|
||||
/* Service Metadatas IDs (svcMDID) */
|
||||
if (identity->private_data->svcMDID != NULL) {
|
||||
t = xmlNewTextChild(xmlnode, NULL, (xmlChar*)"SvcMDIDs", NULL);
|
||||
g_list_foreach(identity->private_data->svcMDID,
|
||||
(GFunc)add_text_childnode_from_list, t);
|
||||
}
|
||||
#endif
|
||||
|
||||
return xmlnode;
|
||||
}
|
||||
|
||||
|
@ -190,11 +162,6 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
|||
{
|
||||
LassoIdentity *identity = LASSO_IDENTITY(node);
|
||||
xmlNode *t;
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
xmlNode *t2;
|
||||
xmlChar *xml_content;
|
||||
gchar *content;
|
||||
#endif
|
||||
|
||||
t = xmlnode->children;
|
||||
while (t) {
|
||||
|
@ -212,34 +179,6 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
|||
g_strdup(federation->remote_providerID), federation);
|
||||
}
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
/* Resource Offerings */
|
||||
if (strcmp((char*)t->name, "ResourceOffering") == 0) {
|
||||
LassoDiscoResourceOffering *offering;
|
||||
offering = LASSO_DISCO_RESOURCE_OFFERING(lasso_node_new_from_xmlNode(t));
|
||||
g_hash_table_insert(identity->private_data->resource_offerings_map,
|
||||
g_strdup(offering->entryID),
|
||||
g_object_ref(offering));
|
||||
}
|
||||
|
||||
/* Service Metadatas IDs (SvcMDID) */
|
||||
if (strcmp((char*)t->name, "SvcMDIDs") == 0) {
|
||||
t2 = t->children;
|
||||
while (t2) {
|
||||
if (t2->type != XML_ELEMENT_NODE) {
|
||||
t2 = t2->next;
|
||||
continue;
|
||||
}
|
||||
xml_content = xmlNodeGetContent(t2);
|
||||
content = g_strdup((gchar *)xml_content);
|
||||
identity->private_data->svcMDID = g_list_append(
|
||||
identity->private_data->svcMDID, content);
|
||||
xmlFree(xml_content);
|
||||
t2 = t2->next;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
t = t->next;
|
||||
}
|
||||
|
||||
|
@ -256,16 +195,9 @@ dispose(GObject *object)
|
|||
{
|
||||
LassoIdentity *identity = LASSO_IDENTITY(object);
|
||||
|
||||
|
||||
if (identity->private_data->dispose_has_run == FALSE) {
|
||||
identity->private_data->dispose_has_run = TRUE;
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_release_list_of_strings(identity->private_data->svcMDID);
|
||||
lasso_release_ghashtable(identity->private_data->resource_offerings_map);
|
||||
#endif
|
||||
|
||||
lasso_release_ghashtable(identity->federations);
|
||||
|
||||
G_OBJECT_CLASS(parent_class)->dispose(object);
|
||||
}
|
||||
}
|
||||
|
@ -288,12 +220,6 @@ instance_init(LassoIdentity *identity)
|
|||
{
|
||||
identity->private_data = g_new0(LassoIdentityPrivate, 1);
|
||||
identity->private_data->dispose_has_run = FALSE;
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
identity->private_data->svcMDID = NULL;
|
||||
identity->private_data->last_entry_id = 0;
|
||||
identity->private_data->resource_offerings_map = g_hash_table_new_full(g_str_hash,
|
||||
g_str_equal, (GDestroyNotify)g_free, (GDestroyNotify)g_object_unref);
|
||||
#endif
|
||||
identity->federations = g_hash_table_new_full(g_str_hash, g_str_equal,
|
||||
(GDestroyNotify)g_free,
|
||||
(GDestroyNotify)lasso_federation_destroy);
|
||||
|
|
|
@ -33,11 +33,6 @@ extern "C" {
|
|||
struct _LassoIdentityPrivate
|
||||
{
|
||||
gboolean dispose_has_run;
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
guint last_entry_id;
|
||||
GHashTable *resource_offerings_map; /* of LassoDiscoResourceOffering */
|
||||
GList *svcMDID; /* of char* */
|
||||
#endif
|
||||
};
|
||||
|
||||
gint lasso_identity_add_federation(LassoIdentity *identity, LassoFederation *federation);
|
||||
|
|
|
@ -270,10 +270,6 @@
|
|||
#include "../saml-2.0/loginprivate.h"
|
||||
#include "../lasso_config.h"
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
#include "../id-wsf/id_ff_extensions_private.h"
|
||||
#endif
|
||||
|
||||
#define LASSO_LOGIN_GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), LASSO_TYPE_LOGIN, LassoLoginPrivate))
|
||||
|
||||
|
@ -416,10 +412,6 @@ lasso_login_build_assertion(LassoLogin *login,
|
|||
lasso_list_add_gobject(LASSO_SAMLP_RESPONSE(profile->response)->Assertion,
|
||||
assertion);
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_login_assertion_add_discovery(login, assertion);
|
||||
#endif
|
||||
|
||||
/* store assertion in session object */
|
||||
if (profile->session == NULL) {
|
||||
profile->session = lasso_session_new();
|
||||
|
@ -2445,11 +2437,6 @@ dispose(GObject *object)
|
|||
|
||||
lasso_release_string(login->private_data->soap_request_msg);
|
||||
lasso_release_gobject(login->private_data->saml2_assertion);
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_release_gobject(login->private_data->resourceId);
|
||||
lasso_release_gobject(login->private_data->encryptedResourceId);
|
||||
#endif
|
||||
lasso_release_string(login->private_data->request_id);
|
||||
G_OBJECT_CLASS(parent_class)->dispose(object);
|
||||
}
|
||||
|
|
|
@ -32,20 +32,11 @@ extern "C" {
|
|||
#include "config.h"
|
||||
#include "../xml/saml-2.0/saml2_assertion.h"
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
#include "../xml/disco_resource_id.h"
|
||||
#include "../xml/disco_encrypted_resource_id.h"
|
||||
#endif
|
||||
|
||||
struct _LassoLoginPrivate
|
||||
{
|
||||
char *soap_request_msg;
|
||||
LassoSaml2Assertion *saml2_assertion;
|
||||
char *request_id;
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
LassoDiscoResourceID *resourceId;
|
||||
LassoDiscoEncryptedResourceID *encryptedResourceId;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -48,10 +48,6 @@
|
|||
#include "../xml/soap-1.1/soap_fault.h"
|
||||
#include "../utils.h"
|
||||
#include "../debug.h"
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
#include "../xml/idwsf_strings.h"
|
||||
#include "../xml/id-wsf-2.0/idwsf2_strings.h"
|
||||
#endif
|
||||
#include "../lasso_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -209,28 +205,6 @@ lasso_profile_get_request_type_from_soap_msg(const gchar *soap)
|
|||
type = LASSO_REQUEST_TYPE_LECP;
|
||||
} else if (strcmp(name, "ManageNameIDRequest") == 0) {
|
||||
type = LASSO_REQUEST_TYPE_NAME_ID_MANAGEMENT;
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
} else if (strcmp(name, "Query") == 0) {
|
||||
if (strcmp((char*)ns->href, LASSO_DISCO_HREF) == 0) {
|
||||
type = LASSO_REQUEST_TYPE_DISCO_QUERY;
|
||||
} else if (strcmp((char*)ns->href, LASSO_IDWSF2_DISCOVERY_HREF) == 0) {
|
||||
type = LASSO_REQUEST_TYPE_IDWSF2_DISCO_QUERY;
|
||||
} else {
|
||||
type = LASSO_REQUEST_TYPE_DST_QUERY;
|
||||
}
|
||||
} else if (strcmp(name, "Modify") == 0) {
|
||||
if (strcmp((char*)ns->href, LASSO_DISCO_HREF) == 0) {
|
||||
type = LASSO_REQUEST_TYPE_DISCO_MODIFY;
|
||||
} else {
|
||||
type = LASSO_REQUEST_TYPE_DST_MODIFY;
|
||||
}
|
||||
} else if (strcmp(name, "SASLRequest") == 0) {
|
||||
type = LASSO_REQUEST_TYPE_SASL_REQUEST;
|
||||
} else if (strcmp(name, "SvcMDRegister") == 0) {
|
||||
type = LASSO_REQUEST_TYPE_IDWSF2_DISCO_SVCMD_REGISTER;
|
||||
} else if (strcmp(name, "SvcMDAssociationAdd") == 0) {
|
||||
type = LASSO_REQUEST_TYPE_IDWSF2_DISCO_SVCMD_ASSOCIATION_ADD;
|
||||
#endif
|
||||
} else {
|
||||
message(G_LOG_LEVEL_WARNING, "Unknown node name : %s", name);
|
||||
}
|
||||
|
|
|
@ -58,17 +58,7 @@ typedef struct _LassoProfilePrivate LassoProfilePrivate;
|
|||
* @LASSO_REQUEST_TYPE_NAME_REGISTRATION: Name Registration
|
||||
* @LASSO_REQUEST_TYPE_NAME_IDENTIFIER_MAPPING: Name Identifier Mapping
|
||||
* @LASSO_REQUEST_TYPE_LECP: Liberty-Enabled Client / Proxy
|
||||
* @LASSO_REQUEST_TYPE_DISCO_QUERY: ID-WSF 1.0 Discovery Query request
|
||||
* @LASSO_REQUEST_TYPE_DISCO_MODIFY: ID-WSF 1.0 Discovery Modify Request
|
||||
* @LASSO_REQUEST_TYPE_DST_QUERY: ID-WSF 1.0 Data Service Template Query request
|
||||
* @LASSO_REQUEST_TYPE_DST_MODIFY: ID-WSF 1.0 Data Service Temaplte Modify request
|
||||
* @LASSO_REQUEST_TYPE_SASL_REQUEST: ID-WSF 1.0 Authentication request
|
||||
* @LASSO_REQUEST_TYPE_NAME_ID_MANAGEMENT: SAML 2.0 NameID Management request
|
||||
* @LASSO_REQUEST_TYPE_IDWSF2_DISCO_SVCMD_REGISTER: ID-WSF 2.0 Discovery Service Metadata Register
|
||||
* request
|
||||
* @LASSO_REQUEST_TYPE_IDWSF2_DISCO_SVCMD_ASSOCIATION_ADD: ID-WSF 2.0 Discovery Service Metadata
|
||||
* Add Association request
|
||||
* @LASSO_REQUEST_TYPE_IDWSF2_DISCO_QUERY: ID-WSF 2.0 Discovery Query request
|
||||
*
|
||||
* Request types (known for SOAP endpoints)
|
||||
*/
|
||||
|
@ -80,15 +70,7 @@ typedef enum {
|
|||
LASSO_REQUEST_TYPE_NAME_REGISTRATION = 4,
|
||||
LASSO_REQUEST_TYPE_NAME_IDENTIFIER_MAPPING = 5,
|
||||
LASSO_REQUEST_TYPE_LECP = 6,
|
||||
LASSO_REQUEST_TYPE_DISCO_QUERY = 7,
|
||||
LASSO_REQUEST_TYPE_DISCO_MODIFY = 8,
|
||||
LASSO_REQUEST_TYPE_DST_QUERY = 9,
|
||||
LASSO_REQUEST_TYPE_DST_MODIFY = 10,
|
||||
LASSO_REQUEST_TYPE_SASL_REQUEST = 11,
|
||||
LASSO_REQUEST_TYPE_NAME_ID_MANAGEMENT = 12,
|
||||
LASSO_REQUEST_TYPE_IDWSF2_DISCO_SVCMD_REGISTER = 13,
|
||||
LASSO_REQUEST_TYPE_IDWSF2_DISCO_SVCMD_ASSOCIATION_ADD = 14,
|
||||
LASSO_REQUEST_TYPE_IDWSF2_DISCO_QUERY = 15
|
||||
} LassoRequestType;
|
||||
|
||||
/**
|
||||
|
|
|
@ -143,7 +143,7 @@ typedef enum {
|
|||
* LassoProtocolConformance:
|
||||
* @LASSO_PROTOCOL_LIBERTY_1_0: Liberty ID-FF 1.0
|
||||
* @LASSO_PROTOCOL_LIBERTY_1_1: Liberty ID-FF 1.1
|
||||
* @LASSO_PROTOCOL_LIBERTY_1_2: Liberty ID-FF 1.2 / ID-WSF 1.0
|
||||
* @LASSO_PROTOCOL_LIBERTY_1_2: Liberty ID-FF 1.2
|
||||
* @LASSO_PROTOCOL_SAML_2_0: SAML 2.0
|
||||
*
|
||||
* Provider protocol conformance.
|
||||
|
|
|
@ -41,10 +41,6 @@
|
|||
#include "../utils.h"
|
||||
#include "../debug.h"
|
||||
#include "../lasso_config.h"
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
#include "../id-wsf/id_ff_extensions_private.h"
|
||||
#include "../id-wsf-2.0/serverprivate.h"
|
||||
#endif
|
||||
|
||||
#define RSA_SHA1 "RSA_SHA1"
|
||||
#define DSA_SHA1 "DSA_SHA1"
|
||||
|
@ -297,11 +293,6 @@ static struct XmlSnippet schema_snippets[] = {
|
|||
{ "SignatureMethod", SNIPPET_ATTRIBUTE, 0, NULL, NULL, NULL },
|
||||
{ "Providers", SNIPPET_LIST_NODES, 0, NULL, NULL, NULL },
|
||||
{ "ServerDumpVersion", SNIPPET_ATTRIBUTE, 0, NULL, NULL, NULL },
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
{ "Services", SNIPPET_LIST_NODES, 0, NULL, NULL, NULL },
|
||||
{ "SvcMDs", SNIPPET_LIST_NODES, 0, NULL, NULL, NULL },
|
||||
#endif
|
||||
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
|
@ -341,11 +332,6 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
|
|||
(GHFunc)add_provider_childnode, t);
|
||||
}
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_server_dump_id_wsf_services(server, xmlnode);
|
||||
lasso_server_dump_id_wsf20_svcmds(server, xmlnode);
|
||||
#endif
|
||||
|
||||
xmlCleanNs(xmlnode);
|
||||
lasso_transfer_xml_node(ret_xmlnode, xmlnode);
|
||||
|
||||
|
@ -422,12 +408,6 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
|||
t2 = xmlSecGetNextElementNode(t2->next);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_server_init_id_wsf_services(server, t);
|
||||
lasso_server_init_id_wsf20_svcmds(server, t);
|
||||
#endif
|
||||
|
||||
t = xmlSecGetNextElementNode(t->next);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,6 @@
|
|||
#include <xmlsec/xmltree.h>
|
||||
#include <xmlsec/base64.h>
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
#include "../id-wsf-2.0/sessionprivate.h"
|
||||
#endif
|
||||
|
||||
static gboolean lasso_match_name_id(LassoNode *a, LassoNode *b);
|
||||
|
||||
struct _NidAndSessionIndex {
|
||||
|
@ -355,23 +351,6 @@ lasso_session_add_assertion(LassoSession *session, const char *providerID, Lasso
|
|||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
/* ID-WSF specific need */
|
||||
if (LASSO_IS_SAML_ASSERTION(assertion)) {
|
||||
LassoSamlAssertion *saml_assertion = LASSO_SAML_ASSERTION(assertion);
|
||||
if (saml_assertion->Advice) {
|
||||
LassoSamlAdvice *advice = saml_assertion->Advice;
|
||||
LassoSamlAssertion *advice_assertion = (LassoSamlAssertion*)advice->Assertion;
|
||||
if (LASSO_IS_SAML_ASSERTION(advice_assertion)) {
|
||||
xmlNode *node = lasso_node_get_original_xmlnode(&advice_assertion->parent);
|
||||
if (xmlSecCheckNodeName(node, (xmlChar*)"Assertion", (xmlChar*)LASSO_SAML_ASSERTION_HREF)) {
|
||||
xmlChar *id = xmlGetProp(node, (xmlChar*)"AssertionID");
|
||||
ret = lasso_session_add_assertion_with_id(session, (char*)id, node);
|
||||
xmlFree(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
session->is_dirty = TRUE;
|
||||
|
||||
return ret;
|
||||
|
@ -606,11 +585,6 @@ lasso_session_is_empty(LassoSession *session)
|
|||
{
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
if (g_hash_table_size(session->eprs)) {
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -818,10 +792,6 @@ get_xmlNode(LassoNode *node, G_GNUC_UNUSED gboolean lasso_dump)
|
|||
(GHFunc)xmlnode_add_assertion_nid_and_session_indexes, &context);
|
||||
}
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_session_id_wsf2_dump_eprs(session, xmlnode);
|
||||
#endif
|
||||
|
||||
return xmlnode;
|
||||
}
|
||||
|
||||
|
@ -950,10 +920,6 @@ init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
|||
init_from_xml_nid_and_session_index(node, t);
|
||||
}
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_session_id_wsf2_init_eprs(session, t);
|
||||
#endif
|
||||
|
||||
t = t->next;
|
||||
}
|
||||
return 0;
|
||||
|
@ -981,10 +947,6 @@ dispose(GObject *object)
|
|||
lasso_release_ghashtable(session->private_data->assertions_by_id);
|
||||
lasso_release_ghashtable(session->private_data->nid_and_session_indexes);
|
||||
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
lasso_release_ghashtable(session->private_data->eprs);
|
||||
#endif
|
||||
|
||||
G_OBJECT_CLASS(parent_class)->dispose(object);
|
||||
}
|
||||
|
||||
|
@ -1011,11 +973,6 @@ instance_init(LassoSession *session)
|
|||
session->private_data->nid_and_session_indexes = g_hash_table_new_full(g_str_hash,
|
||||
g_str_equal, (GDestroyNotify)g_free,
|
||||
(GDestroyNotify)lasso_release_list_of_nid_an_session_index);
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
session->private_data->eprs = g_hash_table_new_full(g_str_hash, g_str_equal,
|
||||
(GDestroyNotify)g_free,
|
||||
(GDestroyNotify)g_object_unref);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -41,9 +41,6 @@ struct _LassoSessionPrivate
|
|||
GHashTable *status; /* hold temporary response status for sso-art */
|
||||
GHashTable *assertions_by_id;
|
||||
GHashTable *nid_and_session_indexes;
|
||||
#ifdef LASSO_WSF_ENABLED
|
||||
GHashTable *eprs;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define LASSO_SESSION_GET_PRIVATE(o) \
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
liblassoincludedir = $(includedir)/lasso/id-wsf-2.0
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
$(LASSO_CORE_CFLAGS) \
|
||||
-DG_LOG_DOMAIN=\"lasso\"
|
||||
|
||||
noinst_LTLIBRARIES = liblasso-id-wsf2.la
|
||||
|
||||
lasso_private_h_sources = \
|
||||
private.h \
|
||||
serverprivate.h \
|
||||
sessionprivate.h \
|
||||
idwsf2_helper.h
|
||||
|
||||
liblasso_id_wsf2_la_SOURCES = \
|
||||
server.c \
|
||||
session.c \
|
||||
identity.c \
|
||||
discovery.c \
|
||||
data_service.c \
|
||||
profile.c \
|
||||
saml2_login.c \
|
||||
soap_binding.c \
|
||||
idwsf2_helper.c
|
||||
|
||||
liblassoinclude_HEADERS = \
|
||||
id_wsf_2.h \
|
||||
discovery.h \
|
||||
data_service.h \
|
||||
profile.h \
|
||||
identity.h \
|
||||
server.h \
|
||||
session.h \
|
||||
soap_binding.h \
|
||||
saml2_login.h
|
||||
|
||||
EXTRA_DIST = $(lasso_private_h_sources)
|
File diff suppressed because it is too large
Load Diff
|
@ -1,145 +0,0 @@
|
|||
/* $Id: idwsf2_data_service.h 2736 2007-05-30 17:59:38Z dlaniel $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_DATA_SERVICE_H__
|
||||
#define __LASSO_IDWSF2_DATA_SERVICE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "profile.h"
|
||||
#include "../xml/xml.h"
|
||||
#include "../xml/id-wsf-2.0/dstref_query_item.h"
|
||||
#include "../xml/id-wsf-2.0/util_status.h"
|
||||
#include "../xml/id-wsf-2.0/dstref_data.h"
|
||||
#include "../xml/ws/wsa_endpoint_reference.h"
|
||||
|
||||
|
||||
#define LASSO_TYPE_IDWSF2_DATA_SERVICE (lasso_idwsf2_data_service_get_type())
|
||||
#define LASSO_IDWSF2_DATA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_IDWSF2_DATA_SERVICE, LassoIdWsf2DataService))
|
||||
#define LASSO_IDWSF2_DATA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_IDWSF2_DATA_SERVICE, LassoIdWsf2DataServiceClass))
|
||||
#define LASSO_IS_IDWSF2_DATA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
LASSO_TYPE_IDWSF2_DATA_SERVICE))
|
||||
#define LASSO_IS_IDWSF2_DATA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||
LASSO_TYPE_IDWSF2_DATA_SERVICE))
|
||||
#define LASSO_IDWSF2_DATA_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_IDWSF2_DATA_SERVICE, LassoIdWsf2DataServiceClass))
|
||||
|
||||
typedef struct _LassoIdWsf2DataService LassoIdWsf2DataService;
|
||||
typedef struct _LassoIdWsf2DataServiceClass LassoIdWsf2DataServiceClass;
|
||||
typedef struct _LassoIdWsf2DataServicePrivate LassoIdWsf2DataServicePrivate;
|
||||
|
||||
struct _LassoIdWsf2DataService {
|
||||
LassoIdWsf2Profile parent;
|
||||
|
||||
/*< private >*/
|
||||
LassoIdWsf2DataServicePrivate *private_data;
|
||||
};
|
||||
|
||||
struct _LassoIdWsf2DataServiceClass {
|
||||
LassoIdWsf2ProfileClass parent;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
LASSO_IDWSF2_DATA_SERVICE_REQUEST_TYPE_UNKNOWN,
|
||||
LASSO_IDWSF2_DATA_SERVICE_REQUEST_TYPE_QUERY,
|
||||
LASSO_IDWSF2_DATA_SERVICE_REQUEST_TYPE_MODIFY,
|
||||
LASSO_IDWSF2_DATA_SERVICE_REQUEST_TYPE_CREATE,
|
||||
LASSO_IDWSF2_DATA_SERVICE_REQUEST_TYPE_DELETE
|
||||
} LassoIdWsf2DataServiceRequestType;
|
||||
|
||||
LASSO_EXPORT GType lasso_idwsf2_data_service_get_type(void);
|
||||
|
||||
/* Service initialization */
|
||||
LASSO_EXPORT LassoIdWsf2DataService* lasso_idwsf2_data_service_new(LassoServer *server);
|
||||
|
||||
/* Request initialization */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_init_query(LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_init_modify(LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_init_create(LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_init_delete(LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_set_service_type(LassoIdWsf2DataService *service,
|
||||
const char *prefix, const char *service_type);
|
||||
LASSO_EXPORT const char* lasso_idwsf2_data_service_get_service_type(
|
||||
LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT const char* lasso_idwsf2_data_service_get_service_type_prefix(
|
||||
LassoIdWsf2DataService *service);
|
||||
|
||||
/* Manipulate request */
|
||||
LASSO_EXPORT LassoIdWsf2DataServiceRequestType lasso_idwsf2_data_service_get_request_type(
|
||||
LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_add_query_item(
|
||||
LassoIdWsf2DataService *service, const gchar *item_query, const gchar *item_id);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_add_modify_item(LassoIdWsf2DataService *service,
|
||||
const gchar *item_query, xmlNode *new_data, gboolean overrideAllowed,
|
||||
const gchar *item_id);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_add_namespace(LassoIdWsf2DataService *data_service,
|
||||
const char *prefix, const char *href);
|
||||
|
||||
/* Produce request */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_build_request_msg(LassoIdWsf2DataService *service,
|
||||
const char *security_mech_id);
|
||||
|
||||
/* Handle request */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_process_request_msg(LassoIdWsf2DataService *service,
|
||||
const char *msg);
|
||||
LASSO_EXPORT GList *lasso_idwsf2_data_service_get_item_ids(LassoIdWsf2DataService *data_service);
|
||||
LASSO_EXPORT GList *lasso_idwsf2_data_service_get_items(LassoIdWsf2DataService *data_service);
|
||||
LASSO_EXPORT LassoNode* lasso_idwsf2_data_service_get_item(LassoIdWsf2DataService *data_service,
|
||||
const char *item_id);
|
||||
|
||||
/* Reponse initialization */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_validate_request(LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_set_status_code(LassoIdWsf2DataService *service,
|
||||
const char *status_code, const char *status_code2);
|
||||
|
||||
/* Manipulate response */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_set_query_item_result(
|
||||
LassoIdWsf2DataService *data_service, const char *item_id, xmlNode *xml_data,
|
||||
gboolean add);
|
||||
|
||||
/* Produce response */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_build_response_msg(LassoIdWsf2DataService *service);
|
||||
|
||||
/* Handle response */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_data_service_process_response_msg(
|
||||
LassoIdWsf2DataService *service, const char *msg);
|
||||
LASSO_EXPORT LassoIdWsf2UtilStatus *lasso_idwsf2_data_service_get_response_status(
|
||||
LassoIdWsf2DataService *service);
|
||||
LASSO_EXPORT LassoIdWsf2DstRefData* lasso_idwsf2_data_service_get_query_item_result(
|
||||
LassoIdWsf2DataService *service, const char *item_id);
|
||||
LASSO_EXPORT char* lasso_idwsf2_data_service_get_query_item_result_content(
|
||||
LassoIdWsf2DataService *service, const char *item_id);
|
||||
LASSO_EXPORT GList* lasso_idwsf2_data_service_get_query_item_results(
|
||||
LassoIdWsf2DataService *service);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_DATA_SERVICE_H__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,153 +0,0 @@
|
|||
/* $Id: discovery.h,v 1.30 2006/02/21 09:51:49 Exp $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_DISCOVERY_H__
|
||||
#define __LASSO_IDWSF2_DISCOVERY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "profile.h"
|
||||
#include "data_service.h"
|
||||
|
||||
#include "../xml/id-wsf-2.0/disco_query.h"
|
||||
#include "../xml/id-wsf-2.0/disco_query_response.h"
|
||||
#include "../xml/id-wsf-2.0/disco_svc_metadata.h"
|
||||
|
||||
#define LASSO_TYPE_IDWSF2_DISCOVERY (lasso_idwsf2_discovery_get_type())
|
||||
#define LASSO_IDWSF2_DISCOVERY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_IDWSF2_DISCOVERY, LassoIdWsf2Discovery))
|
||||
#define LASSO_IDWSF2_DISCOVERY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_IDWSF2_DISCOVERY, LassoIdWsf2DiscoveryClass))
|
||||
#define LASSO_IS_IDWSF2_DISCOVERY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_IDWSF2_DISCOVERY))
|
||||
#define LASSO_IS_IDWSF2_DISCOVERY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_IDWSF2_DISCOVERY))
|
||||
#define LASSO_IDWSF2_DISCOVERY_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_IDWSF2_DISCOVERY, LassoIdWsf2DiscoveryClass))
|
||||
|
||||
typedef struct _LassoIdWsf2Discovery LassoIdWsf2Discovery;
|
||||
typedef struct _LassoIdWsf2DiscoveryClass LassoIdWsf2DiscoveryClass;
|
||||
typedef struct _LassoIdWsf2DiscoveryPrivate LassoIdWsf2DiscoveryPrivate;
|
||||
|
||||
struct _LassoIdWsf2Discovery {
|
||||
LassoIdWsf2Profile parent;
|
||||
|
||||
/*< private >*/
|
||||
LassoIdWsf2DiscoveryPrivate *private_data;
|
||||
};
|
||||
|
||||
struct _LassoIdWsf2DiscoveryClass {
|
||||
LassoIdWsf2ProfileClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_idwsf2_discovery_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoIdWsf2Discovery* lasso_idwsf2_discovery_new(LassoServer *server);
|
||||
|
||||
/**
|
||||
* LassoIdWsf2DiscoveryRequestType:
|
||||
* @LASSO_IDWSF2_DISCOVERY_METADATA_REGISTER_REQUEST:
|
||||
* @LASSO_IDWSF2_DISCOVERY_METADATA_ASSOCIATION_REQUEST:
|
||||
* @LASSO_IDWSF2_DISCOVERY_METADATA_DISSOCIATION_REQUEST:
|
||||
* @LASSO_IDWSF2_DISCOVERY_QUERY:
|
||||
*/
|
||||
typedef enum {
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_UNKNOWN,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_QUERY,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_MD_QUERY,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_MD_REGISTER,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_MD_REPLACE,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_MD_DELETE,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_MD_ASSOCIATION_ADD,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_MD_ASSOCIATION_DELETE,
|
||||
LASSO_IDWSF2_DISCOVERY_REQUEST_TYPE_MD_ASSOCIATION_QUERY,
|
||||
} LassoIdWsf2DiscoveryRequestType;
|
||||
|
||||
/**
|
||||
* LassoIdWsf2DiscoveryQueryResultType:
|
||||
* @LASSO_IDWSF2_DISCOVERY_QUERY_RESULT_TYPE_BEST:
|
||||
* @LASSO_IDWSF2_DISCOVERY_QUERY_RESULT_TYPE_ALL:
|
||||
* @LASSO_IDWSF2_DISCOVERY_QUERY_RESULT_TYPE_ONLY_ONE:
|
||||
*/
|
||||
typedef enum {
|
||||
LASSO_IDWSF2_DISCOVERY_QUERY_RESULT_TYPE_NONE,
|
||||
LASSO_IDWSF2_DISCOVERY_QUERY_RESULT_TYPE_BEST,
|
||||
LASSO_IDWSF2_DISCOVERY_QUERY_RESULT_TYPE_ALL,
|
||||
LASSO_IDWSF2_DISCOVERY_QUERY_RESULT_TYPE_ONLY_ONE
|
||||
} LassoIdWsf2DiscoveryQueryResultType;
|
||||
|
||||
/* Request initialization */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_query(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_metadata_query(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_metadata_register(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_metadata_replace(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_metadata_delete(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_metadata_association_add(
|
||||
LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_metadata_association_delete(
|
||||
LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_init_metadata_association_query(
|
||||
LassoIdWsf2Discovery *discovery);
|
||||
|
||||
/* Add metadatas to operate on, to make request, but also to make responses. */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_add_service_metadata(
|
||||
LassoIdWsf2Discovery *idwsf2_discovery, LassoIdWsf2DiscoSvcMetadata *service_metadata);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_add_simple_service_metadata(
|
||||
LassoIdWsf2Discovery *idwsf2_discovery, const char *abstract,
|
||||
const char *provider_id, GList *service_types, GList *options, const char *address,
|
||||
GList *security_mechanisms);
|
||||
LASSO_EXPORT GList* lasso_idwsf2_discovery_get_metadatas(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_add_requested_service(LassoIdWsf2Discovery *discovery,
|
||||
GList *service_types, GList *provider_ids, GList *options, GList *security_mechanisms,
|
||||
GList *frameworks, GList *actions, LassoIdWsf2DiscoveryQueryResultType result_type,
|
||||
const char *req_id);
|
||||
|
||||
/* Build the request message */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_build_request_msg(LassoIdWsf2Discovery *discovery,
|
||||
const char *security_mechanism);
|
||||
|
||||
/* Handle a request */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_process_request_msg(LassoIdWsf2Discovery *discovery,
|
||||
const char *message);
|
||||
LASSO_EXPORT LassoIdWsf2DiscoveryRequestType lasso_idwsf2_discovery_get_request_type(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_validate_request(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_fail_request(LassoIdWsf2Discovery *discovery,
|
||||
const char *status_code, const char *status_code2);
|
||||
|
||||
/* Process the response */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_discovery_process_response_msg(LassoIdWsf2Discovery *discovery,
|
||||
const char *msg);
|
||||
LASSO_EXPORT GList* lasso_idwsf2_discovery_get_endpoint_references(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT GList* lasso_idwsf2_discovery_get_svcmdids(LassoIdWsf2Discovery *discovery);
|
||||
LASSO_EXPORT void lasso_idwsf2_discovery_set_svcmdids(LassoIdWsf2Discovery *discovery, GList *svcmdids);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_DISCOVERY_H__ */
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_ID_WSF_2_H__
|
||||
#define __LASSO_IDWSF2_ID_WSF_2_H__
|
||||
|
||||
#include "session.h"
|
||||
#include "identity.h"
|
||||
#include "discovery.h"
|
||||
#include "data_service.h"
|
||||
#include "server.h"
|
||||
|
||||
|
||||
#endif /* __LASSO_IDWSF2_ID_WSF_2_H__ */
|
|
@ -1,54 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "identity.h"
|
||||
#include "../xml/id-wsf-2.0/idwsf2_strings.h"
|
||||
#include "../utils.h"
|
||||
#include "../id-ff/identity.h"
|
||||
#include "../id-ff/identityprivate.h"
|
||||
|
||||
gint
|
||||
lasso_identity_add_svc_md_id(LassoIdentity *identity, gchar *svcMDID)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(svcMDID != NULL, LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
|
||||
lasso_list_add_string(identity->private_data->svcMDID, svcMDID);
|
||||
identity->is_dirty = TRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_identity_get_svc_md_ids:
|
||||
* @identity: a #LassoIdentity object
|
||||
*
|
||||
* Return value:(element-type string): a list of all collected svcMDIDs
|
||||
*/
|
||||
GList*
|
||||
lasso_identity_get_svc_md_ids(LassoIdentity *identity)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), NULL);
|
||||
|
||||
return identity->private_data->svcMDID;
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/* $Id: identity.h 2633 2005-09-05 10:00:07Z dlaniel $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_IDENTITY_H__
|
||||
#define __LASSO_IDWSF2_IDENTITY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/identity.h"
|
||||
#include "../export.h"
|
||||
#include <glib.h>
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_identity_add_svc_md_id(LassoIdentity *identity, gchar *svcMDID);
|
||||
|
||||
LASSO_EXPORT GList* lasso_identity_get_svc_md_ids(LassoIdentity *identity);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_IDENTITY_H__ */
|
||||
|
|
@ -1,381 +0,0 @@
|
|||
/* $Id: idwsf2_data_service.c 3101 2007-05-30 11:40:10Z dlaniel $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "idwsf2_helper.h"
|
||||
#include "../xml/id-wsf-2.0/idwsf2_strings.h"
|
||||
#include "../xml/id-wsf-2.0/disco_abstract.h"
|
||||
#include "../xml/id-wsf-2.0/disco_service_type.h"
|
||||
#include "../xml/id-wsf-2.0/disco_provider_id.h"
|
||||
#include "../xml/id-wsf-2.0/sec_token.h"
|
||||
#include "../xml/id-wsf-2.0/sbf_framework.h"
|
||||
#include "../xml/misc_text_node.h"
|
||||
#include "../utils.h"
|
||||
|
||||
/**
|
||||
* SECTION: idwsf2-helper
|
||||
*
|
||||
* Methods to help manipulate EPR elements
|
||||
*/
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_get_idwsf2_service_type:
|
||||
*
|
||||
* Return the disco:ServiceType metadata element content
|
||||
*
|
||||
* Return value: (transfer none): the content of the first disco:ServiceType metadata, or NULL if
|
||||
* none is found.
|
||||
*/
|
||||
const char*
|
||||
lasso_wsa_endpoint_reference_get_idwsf2_service_type(const LassoWsAddrEndpointReference *epr)
|
||||
{
|
||||
LassoIdWsf2DiscoServiceType *disco2_service_type;
|
||||
|
||||
if (! LASSO_IS_WSA_ENDPOINT_REFERENCE (epr) || epr->Metadata == NULL)
|
||||
return NULL;
|
||||
disco2_service_type = lasso_extract_gobject_from_list (LassoIdWsf2DiscoServiceType,
|
||||
LASSO_TYPE_IDWSF2_DISCO_SERVICE_TYPE, epr->Metadata->any);
|
||||
if (disco2_service_type) {
|
||||
return disco2_service_type->content;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_get_idwsf2_provider_id
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
*
|
||||
* Return the provider ID from the the metadata element of the EPR.
|
||||
*
|
||||
* Return value: an entityID identifier or NULL if none is found, or the element is empty.
|
||||
*/
|
||||
const char*
|
||||
lasso_wsa_endpoint_reference_get_idwsf2_provider_id(const LassoWsAddrEndpointReference *epr)
|
||||
{
|
||||
LassoIdWsf2DiscoProviderID *disco2_provider_id;
|
||||
|
||||
if (! LASSO_IS_WSA_ENDPOINT_REFERENCE (epr) || epr->Metadata == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Get the service type from the EPR */
|
||||
disco2_provider_id = lasso_extract_gobject_from_list (LassoIdWsf2DiscoProviderID,
|
||||
LASSO_TYPE_IDWSF2_DISCO_PROVIDER_ID, epr->Metadata->any);
|
||||
|
||||
if (disco2_provider_id) {
|
||||
return disco2_provider_id->content;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_get_idwsf2_security_context_for_security_mechanism:
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
* @security_mech_predicate: (allow-none): a predicate to test for security mechanism
|
||||
* @security_mech_id: (allow-none): a security mechanism identifier
|
||||
* @create: allow to create the element if none if found, @security_mech_id is mandatory when create
|
||||
* is TRUE.
|
||||
*
|
||||
* Return value: (transfer none): a #LassoIdWsf2DiscoSecurityContext, or NULL if none was found and
|
||||
* created is FALSE.
|
||||
*/
|
||||
LassoIdWsf2DiscoSecurityContext*
|
||||
lasso_wsa_endpoint_reference_get_idwsf2_security_context_for_security_mechanism(
|
||||
const LassoWsAddrEndpointReference *epr,
|
||||
gboolean (*sech_mech_predicate)(const char *),
|
||||
const char *security_mech_id,
|
||||
gboolean create)
|
||||
{
|
||||
LassoIdWsf2DiscoSecurityContext *created = NULL;
|
||||
LassoMiscTextNode *new_security_mech_id_declaration;
|
||||
|
||||
if (! LASSO_IS_WSA_ENDPOINT_REFERENCE (epr) || epr->Metadata == NULL)
|
||||
return NULL;
|
||||
|
||||
lasso_foreach_full_begin(LassoIdWsf2DiscoSecurityContext*, context, it1, epr->Metadata->any);
|
||||
if (LASSO_IS_IDWSF2_DISCO_SECURITY_CONTEXT (context)) {
|
||||
lasso_foreach_full_begin(char*, textnode, it2, context->SecurityMechID);
|
||||
if (lasso_strisequal(textnode,security_mech_id) || sech_mech_predicate(textnode)) {
|
||||
return context;
|
||||
}
|
||||
lasso_foreach_full_end()
|
||||
}
|
||||
lasso_foreach_full_end();
|
||||
|
||||
if (create && security_mech_id) {
|
||||
created = lasso_idwsf2_disco_security_context_new();
|
||||
new_security_mech_id_declaration =
|
||||
lasso_misc_text_node_new_with_string(security_mech_id);
|
||||
new_security_mech_id_declaration->name = "SecurityMechID";
|
||||
new_security_mech_id_declaration->ns_href = LASSO_IDWSF2_DISCOVERY_HREF;
|
||||
new_security_mech_id_declaration->ns_prefix = LASSO_IDWSF2_DISCOVERY_PREFIX;
|
||||
lasso_list_add_new_gobject (created->SecurityMechID,
|
||||
new_security_mech_id_declaration);
|
||||
lasso_list_add_new_gobject (epr->Metadata->any, created);
|
||||
}
|
||||
if (create && ! security_mech_id) {
|
||||
message(G_LOG_LEVEL_WARNING, "cannot create a LassoIdWsf2DiscoSecurityContext withou a security_mech_id");
|
||||
}
|
||||
|
||||
return created;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_get_token_by_usage:
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
* @security_mech_predicate: (allow-none): a predicate to test for security mechanism
|
||||
* @security_mech_id: (allow-none): a security mechanism identifier
|
||||
* @usage: the usage to make of the token
|
||||
*
|
||||
* Try to find a token for the given usage and security mechanism, the security can be chosen by
|
||||
* name or by a predicate.
|
||||
*
|
||||
* Return value: a #LassoNode object or a subclass, representing the token.
|
||||
*/
|
||||
static LassoNode*
|
||||
lasso_wsa_endpoint_reference_get_token_by_usage(
|
||||
const LassoWsAddrEndpointReference *epr,
|
||||
gboolean (*sec_mech_predicate)(const char *),
|
||||
const char *security_mech_id, const char* usage)
|
||||
{
|
||||
LassoIdWsf2DiscoSecurityContext *security_context;
|
||||
|
||||
security_context =
|
||||
lasso_wsa_endpoint_reference_get_idwsf2_security_context_for_security_mechanism(
|
||||
epr, sec_mech_predicate, security_mech_id, TRUE);
|
||||
lasso_foreach_full_begin (LassoIdWsf2SecToken*, token, iter, security_context->Token);
|
||||
if (LASSO_IS_IDWSF2_SEC_TOKEN (token)) {
|
||||
if (usage && lasso_strisequal(token->usage,usage)) {
|
||||
if (LASSO_IS_NODE(token->any)) {
|
||||
return (LassoNode*)token->any;
|
||||
} else if (token->ref) {
|
||||
message(G_LOG_LEVEL_WARNING, "sec:Token ref attribute is not supported");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
lasso_foreach_full_end();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_get_security_token:
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
* @sech_mech_predicate:(allow-none): a boolean function to select the security mechanism for which
|
||||
* we want the security token
|
||||
* @security_mech_id:(allow-none): an optional specific security mechanism identifier to select the
|
||||
* security token.
|
||||
*
|
||||
* Return the first security token found in the metadata of the @epr object which qualify with
|
||||
* respect to the predicate or the given security mechanism identifier. It is an error to pass both
|
||||
* of @sech_mech_predicate and @security_mech_id as NULL.
|
||||
*
|
||||
* Return value:(transfer none): a #LassoNode object or NULL if the query cannot be satisfied.
|
||||
*/
|
||||
LassoNode*
|
||||
lasso_wsa_endpoint_reference_get_security_token (const LassoWsAddrEndpointReference *epr,
|
||||
gboolean (*sech_mech_predicate)(const char *), const char *security_mech_id)
|
||||
{
|
||||
return lasso_wsa_endpoint_reference_get_token_by_usage (epr, sech_mech_predicate,
|
||||
security_mech_id, LASSO_IDWSF2_SEC_TOKEN_USAGE_SECURITY_TOKEN);
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_get_target_identity_token:
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
* @sech_mech_predicate:(allow-none): a boolean function to select the security mechanism for which
|
||||
* we want the security token
|
||||
* @security_mech_id:(allow-none): an optional specific security mechanism identifier to select the
|
||||
* security token.
|
||||
*
|
||||
* Return the first target identity token found in the metadata of the @epr object which qualify
|
||||
* with respect to the predicate or the given security mechanism identifier. It is an error to pass
|
||||
* both of @sech_mech_predicate and @security_mech_id as NULL.
|
||||
*
|
||||
* Return value:(transfer none): a #LassoNode object or NULL if the query cannot be satisfied.
|
||||
*/
|
||||
LassoNode*
|
||||
lasso_wsa_endpoint_reference_get_target_identity_token(const LassoWsAddrEndpointReference *epr,
|
||||
gboolean (*sech_mech_predicate)(const char *), const char *security_mech_id)
|
||||
{
|
||||
return lasso_wsa_endpoint_reference_get_token_by_usage (epr, sech_mech_predicate,
|
||||
security_mech_id, LASSO_IDWSF2_SEC_TOKEN_USAGE_TARGET_IDENTITY);
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_new_for_idwsf2_service:
|
||||
* @address: the URL of the SOAP endpoint where the service is anchored
|
||||
* @service_type: an URI identifying the ID-WSF 2.0 service type
|
||||
* @provider_id: an URI identifying the SAML 2.0 service provider hosting the service, this should
|
||||
* help in finding key material for security mechanisms.
|
||||
* @abstract: a human description of the service.
|
||||
*
|
||||
* Create and populate a new #LassoWsAddrEndpointReference object.
|
||||
*
|
||||
* Return value: a newly created #LassoWsAddrEndpointReference.
|
||||
*/
|
||||
LassoWsAddrEndpointReference*
|
||||
lasso_wsa_endpoint_reference_new_for_idwsf2_service(const char *address,
|
||||
const char *service_type, const char *provider_id, const char *abstract)
|
||||
{
|
||||
LassoWsAddrEndpointReference *epr = NULL;
|
||||
LassoWsAddrMetadata *metadata = NULL;
|
||||
|
||||
/* Check parameters */
|
||||
if (address == NULL || service_type == NULL || provider_id == NULL || abstract == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Build EndpointReference */
|
||||
epr = lasso_wsa_endpoint_reference_new();
|
||||
|
||||
/* Address */
|
||||
epr->Address = lasso_wsa_attributed_uri_new_with_string(address);
|
||||
|
||||
/* Metadatas */
|
||||
metadata = lasso_wsa_metadata_new();
|
||||
epr->Metadata = metadata;
|
||||
|
||||
/* Abstract */
|
||||
lasso_list_add_new_gobject(metadata->any,
|
||||
lasso_idwsf2_disco_abstract_new_with_string(abstract));
|
||||
|
||||
/* ProviderID */
|
||||
lasso_list_add_new_gobject(metadata->any,
|
||||
lasso_idwsf2_disco_provider_id_new_with_string(provider_id));
|
||||
|
||||
/* ServiceType */
|
||||
lasso_list_add_new_gobject(metadata->any,
|
||||
lasso_idwsf2_disco_service_type_new_with_string(service_type));
|
||||
|
||||
/* Framework */
|
||||
lasso_list_add_new_gobject(metadata->any,
|
||||
lasso_idwsf2_sbf_framework_new_full("2.0"));
|
||||
|
||||
return epr;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_add_security_token:
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
* @security_token: a security token as a #LassoNode object
|
||||
* @security_mechanisms:(element-type utf8): a list of security mechanism
|
||||
* for whom the token is made
|
||||
*
|
||||
* Add a new security context declaration for the given security mechanisms identifiers and populate
|
||||
* it with a security token.
|
||||
*
|
||||
* Return value: 0 if successfull, an error code otherwise.
|
||||
*/
|
||||
int
|
||||
lasso_wsa_endpoint_reference_add_security_token(LassoWsAddrEndpointReference *epr,
|
||||
LassoNode *security_token, GList *security_mechanisms)
|
||||
{
|
||||
LassoIdWsf2SecToken *sec_token = NULL;
|
||||
LassoWsAddrMetadata *metadata = NULL;
|
||||
LassoIdWsf2DiscoSecurityContext *security_context = NULL;
|
||||
int rc = 0;
|
||||
|
||||
lasso_bad_param(WSA_ENDPOINT_REFERENCE, epr);
|
||||
lasso_bad_param(NODE, security_token);
|
||||
|
||||
lasso_extract_node_or_fail(metadata, epr->Metadata, WSA_METADATA, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
sec_token = lasso_idwsf2_sec_token_new();
|
||||
lasso_assign_gobject(sec_token->any, security_token);
|
||||
lasso_assign_string(sec_token->usage, LASSO_IDWSF2_SEC_TOKEN_USAGE_SECURITY_TOKEN);
|
||||
|
||||
security_context = lasso_idwsf2_disco_security_context_new();
|
||||
lasso_assign_list_of_strings(security_context->SecurityMechID,
|
||||
security_mechanisms);
|
||||
lasso_list_add_new_gobject(security_context->Token, sec_token);
|
||||
lasso_list_add_new_gobject(metadata->any, security_context);
|
||||
cleanup:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static GHashTable *_mapping = NULL;
|
||||
|
||||
static GHashTable *_get_mapping() {
|
||||
if (_mapping == NULL) {
|
||||
_mapping = g_hash_table_new_full(g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);
|
||||
}
|
||||
return _mapping;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_associate_service_to_type:
|
||||
* @service_type_uri: a service type to associate
|
||||
* @g_type: the type of the profile object handling this service type
|
||||
*
|
||||
* Associate a profile type to a service type.
|
||||
*
|
||||
* Return value: 0 if successful, an error code otherwise.
|
||||
*/
|
||||
int
|
||||
lasso_wsa_endpoint_reference_associate_service_to_type(
|
||||
const char *service_type_uri, GType g_type)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
lasso_check_non_empty_string(service_type_uri);
|
||||
if (! g_type_is_a(g_type, LASSO_TYPE_IDWSF2_PROFILE)) {
|
||||
return LASSO_PARAM_ERROR_INVALID_VALUE;
|
||||
}
|
||||
g_hash_table_insert(_get_mapping(),
|
||||
g_strdup(service_type_uri), (gpointer)g_type);
|
||||
cleanup:
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_wsa_endpoint_reference_get_service:
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
*
|
||||
* Get a profile object able to communicate with the service represented by this EPR.
|
||||
*
|
||||
* Return object: a newly created #LassoIdWsf2Profile instance.
|
||||
*/
|
||||
LassoIdWsf2Profile *
|
||||
lasso_wsa_endpoint_reference_get_service(
|
||||
LassoWsAddrEndpointReference *epr)
|
||||
{
|
||||
GType type;
|
||||
const char *service_type_uri;
|
||||
|
||||
if (! LASSO_IS_WSA_ENDPOINT_REFERENCE(epr))
|
||||
return NULL;
|
||||
|
||||
service_type_uri = lasso_wsa_endpoint_reference_get_idwsf2_service_type(epr);
|
||||
type = (GType)g_hash_table_lookup(_get_mapping(), service_type_uri);
|
||||
if (type) {
|
||||
LassoIdWsf2Profile *profile;
|
||||
|
||||
profile = (LassoIdWsf2Profile*)g_object_new(type, NULL);
|
||||
lasso_idwsf2_profile_set_epr(profile, epr);
|
||||
|
||||
return profile;
|
||||
}
|
||||
return NULL;
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
/* $Id: wsf_profile.h,v 1.13 2006/11/14 17:07:30 Exp $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_HELPER_H__
|
||||
#define __LASSO_IDWSF2_HELPER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../xml/ws/wsa_endpoint_reference.h"
|
||||
#include "../xml/id-wsf-2.0/disco_security_context.h"
|
||||
#include "profile.h"
|
||||
|
||||
|
||||
const char* lasso_wsa_endpoint_reference_get_idwsf2_service_type(
|
||||
const LassoWsAddrEndpointReference *epr);
|
||||
|
||||
const char* lasso_wsa_endpoint_reference_get_idwsf2_provider_id(
|
||||
const LassoWsAddrEndpointReference *epr);
|
||||
|
||||
LassoIdWsf2DiscoSecurityContext*
|
||||
lasso_wsa_endpoint_reference_get_idwsf2_security_context_for_security_mechanism(
|
||||
const LassoWsAddrEndpointReference *epr,
|
||||
gboolean (*sech_mech_predicate)(const char *),
|
||||
const char *security_mech_id,
|
||||
gboolean create);
|
||||
|
||||
LassoNode* lasso_wsa_endpoint_reference_get_security_token (const LassoWsAddrEndpointReference *epr,
|
||||
gboolean (*sech_mech_predicate)(const char *), const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT LassoNode* lasso_wsa_endpoint_reference_get_target_identity_token(
|
||||
const LassoWsAddrEndpointReference *epr,
|
||||
gboolean (*sech_mech_predicate)(const char *), const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT LassoWsAddrEndpointReference* lasso_wsa_endpoint_reference_new_for_idwsf2_service(
|
||||
const char *address, const char *service_ype, const char *provider_id,
|
||||
const char *abstract);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsa_endpoint_reference_add_security_token(LassoWsAddrEndpointReference *epr,
|
||||
LassoNode *security_token, GList *security_mechanisms);
|
||||
|
||||
LASSO_EXPORT LassoIdWsf2Profile *lasso_wsa_endpoint_reference_get_service(
|
||||
LassoWsAddrEndpointReference *epr);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsa_endpoint_reference_associate_service_to_type(
|
||||
const char *service_type_uri, GType g_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_HELPER_H__ */
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_ID_WSF_20_PRIVATE_H__
|
||||
#define __LASSO_ID_WSF_20_PRIVATE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern gboolean lasso_flag_follow_id_wsf_stupid_semantic;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_ID_WSF_20_PRIVATE_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,110 +0,0 @@
|
|||
/* $Id: wsf_profile.h,v 1.13 2006/11/14 17:07:30 Exp $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_PROFILE_H__
|
||||
#define __LASSO_IDWSF2_PROFILE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/profile.h"
|
||||
#include "../xml/soap-1.1/soap_envelope.h"
|
||||
#include "../xml/ws/wsa_endpoint_reference.h"
|
||||
|
||||
#define LASSO_TYPE_IDWSF2_PROFILE (lasso_idwsf2_profile_get_type())
|
||||
#define LASSO_IDWSF2_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_IDWSF2_PROFILE, LassoIdWsf2Profile))
|
||||
#define LASSO_IDWSF2_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_IDWSF2_PROFILE, LassoIdWsf2ProfileClass))
|
||||
#define LASSO_IS_IDWSF2_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
LASSO_TYPE_IDWSF2_PROFILE))
|
||||
#define LASSO_IS_IDWSF2_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||
LASSO_TYPE_IDWSF2_PROFILE))
|
||||
#define LASSO_IDWSF2_PROFILE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_IDWSF2_PROFILE, LassoIdWsf2ProfileClass))
|
||||
|
||||
|
||||
typedef struct _LassoIdWsf2Profile LassoIdWsf2Profile;
|
||||
typedef struct _LassoIdWsf2ProfileClass LassoIdWsf2ProfileClass;
|
||||
typedef struct _LassoIdWsf2ProfilePrivate LassoIdWsf2ProfilePrivate;
|
||||
|
||||
struct _LassoIdWsf2Profile {
|
||||
LassoProfile parent;
|
||||
|
||||
/*< private >*/
|
||||
LassoIdWsf2ProfilePrivate *private_data;
|
||||
};
|
||||
|
||||
struct _LassoIdWsf2ProfileClass {
|
||||
LassoProfileClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_idwsf2_profile_get_type(void);
|
||||
|
||||
/* Initialize profile */
|
||||
LASSO_EXPORT void lasso_idwsf2_profile_set_epr(LassoIdWsf2Profile *idwsf2_profile,
|
||||
LassoWsAddrEndpointReference *epr);
|
||||
LASSO_EXPORT LassoWsAddrEndpointReference* lasso_idwsf2_profile_get_epr(
|
||||
LassoIdWsf2Profile *idwsf2_profile);
|
||||
|
||||
/* Initialize requests */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_init_request(LassoIdWsf2Profile *profile);
|
||||
|
||||
/* Build request message */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_build_request_msg(LassoIdWsf2Profile *profile,
|
||||
const char *security_mech_id);
|
||||
|
||||
/* Handle request */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_process_request_msg(LassoIdWsf2Profile *profile,
|
||||
const char *msg);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_check_security_mechanism(LassoIdWsf2Profile *profile,
|
||||
const char *security_mech_id);
|
||||
LASSO_EXPORT LassoSoapEnvelope* lasso_idwsf2_profile_get_soap_envelope_request(
|
||||
LassoIdWsf2Profile *idwsf2_profile);
|
||||
LASSO_EXPORT LassoNode *lasso_idwsf2_profile_get_name_identifier(
|
||||
LassoIdWsf2Profile *idwsf2_profile);
|
||||
|
||||
/* Initialize response */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_init_response(LassoIdWsf2Profile *profile);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_init_soap_fault_response(LassoIdWsf2Profile *profile,
|
||||
const char *faultcode, const char *faultstring,
|
||||
GList *details);
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_redirect_user_for_interaction(LassoIdWsf2Profile *profile,
|
||||
const gchar *redirect_url, gboolean for_data);
|
||||
|
||||
/* Build response message */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_build_response_msg(LassoIdWsf2Profile *profile);
|
||||
|
||||
/* Handle response */
|
||||
LASSO_EXPORT lasso_error_t lasso_idwsf2_profile_process_response_msg(LassoIdWsf2Profile *profile,
|
||||
const char *msg);
|
||||
LASSO_EXPORT LassoSoapEnvelope* lasso_idwsf2_profile_get_soap_envelope_response(
|
||||
LassoIdWsf2Profile *idwsf2_profile);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_PROFILE_H__ */
|
||||
|
|
@ -1,293 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "saml2_login.h"
|
||||
#include "../xml/id-wsf-2.0/idwsf2_strings.h"
|
||||
#include "identity.h"
|
||||
#include "server.h"
|
||||
#include "session.h"
|
||||
#include "../id-ff/login.h"
|
||||
#include "../saml-2.0/saml2_helper.h"
|
||||
#include "../saml-2.0/provider.h"
|
||||
#include "../xml/saml-2.0/saml2_assertion.h"
|
||||
#include "../xml/ws/wsa_endpoint_reference.h"
|
||||
#include "../xml/id-wsf-2.0/disco_abstract.h"
|
||||
#include "../xml/id-wsf-2.0/disco_provider_id.h"
|
||||
#include "../xml/id-wsf-2.0/disco_service_type.h"
|
||||
#include "../xml/id-wsf-2.0/disco_service_context.h"
|
||||
#include "../xml/id-wsf-2.0/disco_security_context.h"
|
||||
#include "../xml/id-wsf-2.0/sec_token.h"
|
||||
#include "../xml/id-wsf-2.0/sbf_framework.h"
|
||||
#include "../id-wsf/wsf_utils.h"
|
||||
#include "../xml/saml-2.0/saml2_attribute.h"
|
||||
#include "../xml/saml-2.0/saml2_attribute_statement.h"
|
||||
#include "../xml/saml-2.0/saml2_attribute_value.h"
|
||||
#include "../xml/saml-2.0/samlp2_response.h"
|
||||
#include "idwsf2_helper.h"
|
||||
#include "../xml/private.h"
|
||||
|
||||
|
||||
/**
|
||||
* lasso_server_create_assertion_as_idwsf2_security_token:
|
||||
* @server: a #LassoServer object
|
||||
* @name_id: a #LassoSaml2NameID object
|
||||
* @tolerance: tolerance around the normal duration which is accepted
|
||||
* @duration: life duration for this assertion in seconds
|
||||
* @cipher: whether to cipher the NameID
|
||||
* @audience:(allow-none)(optional): if @cipher is true, the provider for which to encrypt the NameID
|
||||
*
|
||||
* Create a new assertion usable as a security token in an ID-WSF 2.0 EndpointReference. See
|
||||
* lasso_saml2_assertion_set_basic_conditions() for detail about @tolerance and @duration.
|
||||
*
|
||||
* Return value:(transfer full)(allow-none): a newly allocated #LassoSaml2Assertion object, or NULL.
|
||||
*/
|
||||
LassoSaml2Assertion*
|
||||
lasso_server_create_assertion_as_idwsf2_security_token(LassoServer *server,
|
||||
LassoSaml2NameID *name_id,
|
||||
int tolerance,
|
||||
int duration,
|
||||
gboolean cipher,
|
||||
LassoProvider *audience)
|
||||
{
|
||||
LassoSaml2Assertion *assertion;
|
||||
int rc = 0;
|
||||
|
||||
if (! LASSO_IS_SERVER(server))
|
||||
return NULL;
|
||||
if (! LASSO_IS_SAML2_NAME_ID(name_id))
|
||||
return NULL;
|
||||
if (cipher && ! LASSO_IS_PROVIDER(audience))
|
||||
return NULL;
|
||||
|
||||
assertion = (LassoSaml2Assertion*)lasso_saml2_assertion_new();
|
||||
assertion->ID = lasso_build_unique_id(32);
|
||||
assertion->Issuer = (LassoSaml2NameID*)lasso_saml2_name_id_new_with_string(server->parent.ProviderID);
|
||||
assertion->Subject = (LassoSaml2Subject*)lasso_saml2_subject_new();
|
||||
if (cipher) {
|
||||
LassoSaml2EncryptedElement *encrypted_id =
|
||||
lasso_provider_saml2_node_encrypt(audience, (LassoNode*)name_id);
|
||||
if (! encrypted_id) {
|
||||
lasso_release_gobject(assertion);
|
||||
goto cleanup;
|
||||
}
|
||||
lasso_assign_new_gobject(assertion->Subject->EncryptedID, encrypted_id);
|
||||
} else {
|
||||
lasso_assign_new_gobject(assertion->Subject->NameID, name_id);
|
||||
}
|
||||
lasso_saml2_assertion_set_basic_conditions(assertion,
|
||||
tolerance, duration, FALSE);
|
||||
rc = lasso_server_saml2_assertion_setup_signature(server, assertion);
|
||||
if (rc != 0) {
|
||||
lasso_release_gobject(assertion);
|
||||
}
|
||||
cleanup:
|
||||
return assertion;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* lasso_login_idwsf2_add_discovery_bootstrap_epr:
|
||||
* @login: a #LassoLogin object
|
||||
* @url: the Disco service address
|
||||
* @abstract: the Disco service description
|
||||
* @security_mechanisms:(allow-none)(element-type utf8): the list of supported security mechanisms
|
||||
* @tolerance:(default -1): see lasso_saml2_assertion_set_basic_conditions().
|
||||
* @duration:(default 0): see lasso_saml2_assertion_set_basic_conditions().
|
||||
*
|
||||
* Add the needed bootstrap attribute to the #LassoSaml2Assertion currently container in the
|
||||
* #LassoLogin object. This function should be called after lasso_login_build_assertion() by an IdP
|
||||
* also having the Discovery service role.
|
||||
*
|
||||
* The default @tolerance and @duration are respectively ten minutes and two days.
|
||||
*
|
||||
* Return value: 0 if successfull, otherwise #LASSO_PROFILE_ERROR_MISSING_ASSERTION if no assertion is present
|
||||
* in the #LassoLogin object, #LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ if login is not a #LassoLogin
|
||||
* object.
|
||||
*/
|
||||
int
|
||||
lasso_login_idwsf2_add_discovery_bootstrap_epr(LassoLogin *login, const char *url,
|
||||
const char *abstract, GList *security_mechanisms, int tolerance, int duration)
|
||||
{
|
||||
LassoWsAddrEndpointReference *epr = NULL;
|
||||
LassoWsAddrMetadata *metadata = NULL;
|
||||
LassoSaml2AttributeStatement *attributeStatement = NULL;
|
||||
LassoSaml2Attribute *attribute = NULL;
|
||||
LassoSaml2AttributeValue *attributeValue = NULL;
|
||||
LassoIdWsf2DiscoSecurityContext *security_context = NULL;
|
||||
LassoIdWsf2SecToken *sec_token = NULL;
|
||||
LassoSaml2Assertion *assertion_identity_token = NULL;
|
||||
LassoSaml2Assertion *assertion = NULL;
|
||||
LassoServer *server = NULL;
|
||||
LassoSaml2NameID *name_id = NULL;
|
||||
int rc = 0;
|
||||
|
||||
lasso_bad_param(LOGIN, login);
|
||||
lasso_null_param(url);
|
||||
lasso_null_param(abstract);
|
||||
|
||||
/* Check for the presence of an assertion */
|
||||
assertion = (LassoSaml2Assertion*) lasso_login_get_assertion (login);
|
||||
if (! LASSO_IS_SAML2_ASSERTION (assertion)) {
|
||||
lasso_release_gobject(assertion);
|
||||
return LASSO_PROFILE_ERROR_MISSING_ASSERTION;
|
||||
}
|
||||
lasso_extract_node_or_fail(server, login->parent.server, SERVER,
|
||||
LASSO_PROFILE_ERROR_MISSING_SERVER);
|
||||
/* Warn if the assertion is not a fresh one, we should not modify received assertion */
|
||||
if (lasso_node_get_original_xmlnode((LassoNode*)assertion) != NULL) {
|
||||
message(G_LOG_LEVEL_WARNING, "%s should only be called after lasso_login_build_assertion", __func__);
|
||||
}
|
||||
|
||||
|
||||
/* Build EndpointReference */
|
||||
epr = lasso_wsa_endpoint_reference_new_for_idwsf2_service(
|
||||
url, LASSO_IDWSF2_DISCOVERY_HREF, server->parent.ProviderID, abstract);
|
||||
|
||||
/* Security/Identity token */
|
||||
if (duration <= 0) {
|
||||
duration = 2 * LASSO_DURATION_DAY;
|
||||
}
|
||||
if (tolerance < 0) {
|
||||
tolerance = 10*LASSO_DURATION_MINUTE;
|
||||
}
|
||||
/* If the NameID is encrypted try to get to he unencrypted one */
|
||||
if (assertion->Subject->NameID) {
|
||||
name_id = assertion->Subject->NameID;
|
||||
} else if (assertion->Subject->EncryptedID &&
|
||||
LASSO_IS_SAML2_NAME_ID(assertion->Subject->EncryptedID->original_data)) {
|
||||
name_id = (LassoSaml2NameID*)assertion->Subject->EncryptedID->original_data;
|
||||
}
|
||||
goto_cleanup_if_fail_with_rc (name_id, LASSO_PROFILE_ERROR_MISSING_NAME_IDENTIFIER);
|
||||
assertion_identity_token = lasso_server_create_assertion_as_idwsf2_security_token(server,
|
||||
name_id, tolerance, duration, TRUE, &server->parent);
|
||||
|
||||
/* Add the assertion to the EPR */
|
||||
rc = lasso_wsa_endpoint_reference_add_security_token(epr,
|
||||
(LassoNode*)assertion_identity_token, security_mechanisms);
|
||||
goto_cleanup_if_fail(rc == 0);
|
||||
|
||||
/* Add the EPR to the assertion as a SAML attribute */
|
||||
rc = lasso_saml2_assertion_add_attribute_with_node(assertion,
|
||||
LASSO_SAML2_ATTRIBUTE_NAME_EPR, LASSO_SAML2_ATTRIBUTE_NAME_FORMAT_URI, (LassoNode*)epr);
|
||||
|
||||
|
||||
cleanup:
|
||||
lasso_release_gobject(assertion);
|
||||
lasso_release_gobject(epr);
|
||||
lasso_release_gobject(metadata);
|
||||
lasso_release_gobject(attributeStatement);
|
||||
lasso_release_gobject(attribute);
|
||||
lasso_release_gobject(attributeValue);
|
||||
lasso_release_gobject(security_context);
|
||||
lasso_release_gobject(sec_token);
|
||||
lasso_release_gobject(assertion_identity_token);
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_saml2_assertion_idwsf2_get_discovery_bootstrap_epr:
|
||||
* @assertion: a #LassoSaml2Assertion object
|
||||
*
|
||||
* Extract the Discovery bootstrap EPR from @assertion.
|
||||
*
|
||||
* Return value:(transfer none): a #LassoWsAddrEndpointReference or NULL if no bootstrap EPR is found.
|
||||
*/
|
||||
LassoWsAddrEndpointReference*
|
||||
lasso_saml2_assertion_idwsf2_get_discovery_bootstrap_epr(LassoSaml2Assertion *assertion)
|
||||
{
|
||||
LassoSaml2AttributeStatement *attribute_statement = NULL;
|
||||
LassoSaml2Attribute *attribute = NULL;
|
||||
LassoSaml2AttributeValue *attribute_value = NULL;
|
||||
GList *i = NULL, *j = NULL, *k = NULL;
|
||||
LassoWsAddrEndpointReference *rc = NULL;
|
||||
|
||||
if (! LASSO_IS_SAML2_ASSERTION (assertion)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lasso_foreach (i, assertion->AttributeStatement)
|
||||
{
|
||||
if (! LASSO_IS_SAML2_ATTRIBUTE_STATEMENT (i->data))
|
||||
continue;
|
||||
|
||||
attribute_statement = LASSO_SAML2_ATTRIBUTE_STATEMENT(i->data);
|
||||
|
||||
lasso_foreach (j, attribute_statement->Attribute)
|
||||
{
|
||||
if (! LASSO_IS_SAML2_ATTRIBUTE(j->data))
|
||||
continue;
|
||||
|
||||
attribute = LASSO_SAML2_ATTRIBUTE(j->data);
|
||||
if (lasso_strisnotequal(attribute->Name,LASSO_SAML2_ATTRIBUTE_NAME_EPR))
|
||||
continue;
|
||||
/* There should only one attribute value, and the EPR should be the first
|
||||
* contained node */
|
||||
if (! attribute->AttributeValue)
|
||||
continue;
|
||||
|
||||
if (! LASSO_IS_SAML2_ATTRIBUTE_VALUE (attribute->AttributeValue->data))
|
||||
continue;
|
||||
attribute_value = (LassoSaml2AttributeValue*)attribute->AttributeValue->data;
|
||||
lasso_foreach (k, attribute_value->any) {
|
||||
if (! k->data) {
|
||||
message(G_LOG_LEVEL_CRITICAL, "found a NULL in attribute_value->any");
|
||||
break; /* NULL here ? bad... */
|
||||
}
|
||||
if (! LASSO_IS_WSA_ENDPOINT_REFERENCE (k->data))
|
||||
continue;
|
||||
rc = (LassoWsAddrEndpointReference*)g_object_ref(k->data);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
return rc;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_login_idwsf2_get_discovery_bootstrap_epr:
|
||||
* @login: a #LassoLogin object
|
||||
*
|
||||
* Extract the Discovery boostrap EPR from the attribute named #LASSO_SAML2_ATTRIBUTE_NAME_EPR.
|
||||
*
|
||||
* Return value:(transfer none): a caller owned #LassoWsAddrEndpointReference object, or NULL if none can be found.
|
||||
*/
|
||||
LassoWsAddrEndpointReference *
|
||||
lasso_login_idwsf2_get_discovery_bootstrap_epr(LassoLogin *login)
|
||||
{
|
||||
LassoProfile *profile = NULL;
|
||||
LassoSaml2Assertion *assertion = NULL;
|
||||
LassoWsAddrEndpointReference *rc = NULL;
|
||||
|
||||
g_return_val_if_fail (LASSO_IS_LOGIN (login), NULL);
|
||||
profile = &login->parent;
|
||||
assertion = (LassoSaml2Assertion*)lasso_login_get_assertion(login);
|
||||
rc = lasso_saml2_assertion_idwsf2_get_discovery_bootstrap_epr(assertion);
|
||||
lasso_release_gobject(assertion);
|
||||
|
||||
return rc;
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
/* $Id: server.h 2945 2006-11-19 20:07:46Z dlaniel $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_SAML2_LOGIN_PRIVATE_H__
|
||||
#define __LASSO_IDWSF2_SAML2_LOGIN_PRIVATE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/login.h"
|
||||
#include "../id-ff/provider.h"
|
||||
#include "../xml/saml-2.0/saml2_assertion.h"
|
||||
#include "../xml/saml-2.0/saml2_name_id.h"
|
||||
#include "../xml/ws/wsa_endpoint_reference.h"
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_login_idwsf2_add_discovery_bootstrap_epr(LassoLogin *login, const char *url,
|
||||
const char *abstract, GList *security_mechanisms, int tolerance, int duration);
|
||||
|
||||
LASSO_EXPORT LassoWsAddrEndpointReference *lasso_login_idwsf2_get_discovery_bootstrap_epr(
|
||||
LassoLogin *login);
|
||||
|
||||
LASSO_EXPORT LassoWsAddrEndpointReference*
|
||||
lasso_saml2_assertion_idwsf2_get_discovery_bootstrap_epr(LassoSaml2Assertion *assertion);
|
||||
|
||||
LASSO_EXPORT LassoSaml2Assertion* lasso_server_create_assertion_as_idwsf2_security_token(
|
||||
LassoServer *server, LassoSaml2NameID *name_id, int tolerance, int duration,
|
||||
gboolean cipher, LassoProvider *audience);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_SAML2_LOGIN_PRIVATE_H__ */
|
|
@ -1,146 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "server.h"
|
||||
#include "../xml/id-wsf-2.0/idwsf2_strings.h"
|
||||
#include "../id-ff/server.h"
|
||||
#include "../id-ff/serverprivate.h"
|
||||
#include "../xml/id-wsf-2.0/disco_svc_metadata.h"
|
||||
#include "../xml/id-wsf-2.0/disco_service_context.h"
|
||||
#include <libxml/tree.h>
|
||||
|
||||
gint
|
||||
lasso_server_add_svc_metadata(LassoServer *server, LassoIdWsf2DiscoSvcMetadata *metadata)
|
||||
{
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_SERVER(server), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(LASSO_IS_IDWSF2_DISCO_SVC_METADATA(metadata),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
|
||||
server->private_data->svc_metadatas = g_list_append(
|
||||
server->private_data->svc_metadatas, g_object_ref(metadata));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_server_get_svc_metadatas:
|
||||
* @server: a #LassoServer object
|
||||
*
|
||||
* Return value:(element-type LassoIdWsf2DiscoSvcMetadata)(transfer none): a list of #LassoIdWsf2DiscoSvcMetadata
|
||||
*/
|
||||
const GList *
|
||||
lasso_server_get_svc_metadatas(LassoServer *server)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_SERVER(server), NULL);
|
||||
|
||||
return server->private_data->svc_metadatas;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_server_get_svc_metadatas_with_id_and_type:
|
||||
* @server: a #LassoServer object
|
||||
* @svcMDIDs:(allow-none): a list of service metadata IDs
|
||||
* @service_type:(allow-none): a service type identifier
|
||||
*
|
||||
* Return value:(element-type LassoIdWsf2DiscoSvcMetadata)(transfer full): a list of #LassoIdWsf2DiscoSvcMetadata
|
||||
*/
|
||||
GList *
|
||||
lasso_server_get_svc_metadatas_with_id_and_type(LassoServer *server, GList *svcMDIDs,
|
||||
const gchar *service_type)
|
||||
{
|
||||
gchar *svcMDID;
|
||||
LassoIdWsf2DiscoSvcMetadata *md;
|
||||
GList *result = NULL;
|
||||
GList *i;
|
||||
GList *j;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_SERVER(server), NULL);
|
||||
g_return_val_if_fail(service_type != NULL, NULL);
|
||||
|
||||
for (i = g_list_first(server->private_data->svc_metadatas); i != NULL; i = g_list_next(i)) {
|
||||
md = LASSO_IDWSF2_DISCO_SVC_METADATA(i->data);
|
||||
/* FIXME: this assumes there is one and only one service
|
||||
* context, and service type, this should be fixed to iterate
|
||||
* properly on the GList */
|
||||
if (md->ServiceContext == NULL || strcmp((char*)(LASSO_IDWSF2_DISCO_SERVICE_CONTEXT(
|
||||
md->ServiceContext->data)->ServiceType)->data, service_type) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (svcMDIDs == NULL) {
|
||||
/* If no svcMDID is given, return all the metadatas with given */
|
||||
/* service type */
|
||||
result = g_list_append(result, g_object_ref(md));
|
||||
} else {
|
||||
for (j = g_list_first(svcMDIDs); j != NULL; j = g_list_next(j)) {
|
||||
svcMDID = (gchar *)(j->data);
|
||||
if (strcmp(svcMDID, md->svcMDID) == 0) {
|
||||
result = g_list_append(result, g_object_ref(md));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
lasso_server_init_id_wsf20_svcmds(LassoServer *server, xmlNode *t)
|
||||
{
|
||||
xmlNode *t2 = t->children;
|
||||
|
||||
if (strcmp((char*)t->name, "SvcMDs") == 0) {
|
||||
while (t2) {
|
||||
LassoIdWsf2DiscoSvcMetadata *svcMD;
|
||||
if (t2->type != XML_ELEMENT_NODE) {
|
||||
t2 = t2->next;
|
||||
continue;
|
||||
}
|
||||
svcMD = lasso_idwsf2_disco_svc_metadata_new();
|
||||
LASSO_NODE_GET_CLASS(svcMD)->init_from_xml(LASSO_NODE(svcMD), t2);
|
||||
server->private_data->svc_metadatas = g_list_append(
|
||||
server->private_data->svc_metadatas, svcMD);
|
||||
t2 = t2->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
add_childnode_from_list(LassoNode *value, xmlNode *xmlnode)
|
||||
{
|
||||
xmlAddChild(xmlnode, lasso_node_get_xmlNode(LASSO_NODE(value), TRUE));
|
||||
}
|
||||
|
||||
void
|
||||
lasso_server_dump_id_wsf20_svcmds(LassoServer *server, xmlNode *xmlnode)
|
||||
{
|
||||
/* Service Metadatas (SvcMD) */
|
||||
if (server->private_data->svc_metadatas != NULL) {
|
||||
xmlNode *t;
|
||||
t = xmlNewTextChild(xmlnode, NULL, (xmlChar*)"SvcMDs", NULL);
|
||||
g_list_foreach(server->private_data->svc_metadatas,
|
||||
(GFunc)add_childnode_from_list, t);
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
/* $Id: server.h 2945 2006-11-19 20:07:46Z dlaniel $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_SERVER_H__
|
||||
#define __LASSO_IDWSF2_SERVER_H__
|
||||
|
||||
#include "../utils.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/server.h"
|
||||
#include "../xml/id-wsf-2.0/disco_svc_metadata.h"
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_server_add_svc_metadata(LassoServer *server,
|
||||
LassoIdWsf2DiscoSvcMetadata *metadata);
|
||||
|
||||
LASSO_EXPORT const GList *lasso_server_get_svc_metadatas(LassoServer *server);
|
||||
|
||||
LASSO_EXPORT GList *lasso_server_get_svc_metadatas_with_id_and_type(LassoServer *server,
|
||||
GList *svcMDIDs, const gchar *service_type);
|
||||
|
||||
void lasso_server_init_id_wsf20_services(LassoServer *server, xmlNode *t);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_SERVER_H__ */
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
/* $Id: server.h 2945 2006-11-19 20:07:46Z dlaniel $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_SERVERPRIVATE_H__
|
||||
#define __LASSO_IDWSF2_SERVERPRIVATE_H__
|
||||
|
||||
#include "../utils.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/server.h"
|
||||
#include <libxml/tree.h>
|
||||
|
||||
void lasso_server_init_id_wsf20_svcmds(LassoServer *server, xmlNode *t);
|
||||
|
||||
void lasso_server_dump_id_wsf20_svcmds(LassoServer *server, xmlNode *xmlnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_SERVERPRIVATE_H__ */
|
|
@ -1,192 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:idwsf2-session-extension
|
||||
*/
|
||||
#include "session.h"
|
||||
#include "../xml/id-wsf-2.0/idwsf2_strings.h"
|
||||
#include "../utils.h"
|
||||
#include "../id-ff/session.h"
|
||||
#include "../id-ff/sessionprivate.h"
|
||||
#include "../xml/misc_text_node.h"
|
||||
#include "../xml/ws/wsa_endpoint_reference.h"
|
||||
#include "../xml/saml-2.0/saml2_assertion.h"
|
||||
#include "../xml/id-wsf-2.0/disco_svc_metadata.h"
|
||||
#include "../xml/id-wsf-2.0/disco_service_type.h"
|
||||
#include "../xml/id-wsf-2.0/disco_security_context.h"
|
||||
#include "../xml/id-wsf-2.0/sec_token.h"
|
||||
|
||||
|
||||
typedef struct _DumpContext {
|
||||
xmlNode *parent;
|
||||
} DumpContext;
|
||||
|
||||
/**
|
||||
* lasso_session_add_endpoint_reference:
|
||||
* @session: a #LassoSession object
|
||||
* @epr: a #LassoWsAddrEndpointReference object
|
||||
*
|
||||
* Add an endpoint reference to a session object.
|
||||
*
|
||||
* Return value: 0 if successfull, an error code otherwise.
|
||||
*/
|
||||
gint
|
||||
lasso_session_add_endpoint_reference(LassoSession *session, LassoWsAddrEndpointReference *epr)
|
||||
{
|
||||
GList *i;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_SESSION(session), LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
g_return_val_if_fail(LASSO_IS_WSA_ENDPOINT_REFERENCE(epr), LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
for (i = g_list_first(epr->Metadata->any); i != NULL; i = g_list_next(i)) {
|
||||
if (LASSO_IS_IDWSF2_DISCO_SERVICE_TYPE(i->data)) {
|
||||
g_hash_table_insert(session->private_data->eprs,
|
||||
g_strdup(LASSO_IDWSF2_DISCO_SERVICE_TYPE(i->data)->content),
|
||||
g_object_ref(epr));
|
||||
session->is_dirty = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_session_get_endpoint_reference:
|
||||
* @session: a #LassoSession object
|
||||
* @service_type: a string giving the service type.
|
||||
*
|
||||
* Return an endpoint reference for the given service type.
|
||||
*
|
||||
* Return value: a caller owned #LassoWsAddrEndpointReference object for the given service type if
|
||||
* one is found, NULL otherwise.
|
||||
*/
|
||||
LassoWsAddrEndpointReference*
|
||||
lasso_session_get_endpoint_reference(LassoSession *session, const gchar *service_type)
|
||||
{
|
||||
LassoWsAddrEndpointReference* epr;
|
||||
|
||||
if (! LASSO_IS_SESSION(session) || service_type == NULL)
|
||||
return NULL;
|
||||
|
||||
epr = g_hash_table_lookup(session->private_data->eprs, service_type);
|
||||
if (LASSO_IS_WSA_ENDPOINT_REFERENCE(epr)) {
|
||||
return (LassoWsAddrEndpointReference*)g_object_ref(epr);
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_session_get_assertion_identity_token:
|
||||
* @session: a #LassoSession object
|
||||
* @service_type: a char* string describing the targeted service
|
||||
*
|
||||
* Return a security token to contact a specified service.
|
||||
*
|
||||
* Return value: (allow-none): a #LassoAssertion object or NULL
|
||||
*/
|
||||
LassoSaml2Assertion*
|
||||
lasso_session_get_assertion_identity_token(LassoSession *session, const gchar *service_type)
|
||||
{
|
||||
LassoWsAddrEndpointReference* epr;
|
||||
GList *metadata_item;
|
||||
GList *i;
|
||||
LassoIdWsf2DiscoSecurityContext *security_context;
|
||||
LassoIdWsf2SecToken *sec_token;
|
||||
LassoSaml2Assertion *assertion = NULL;
|
||||
|
||||
if (LASSO_IS_SESSION(session) == FALSE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
epr = lasso_session_get_endpoint_reference(session, service_type);
|
||||
if (epr == NULL || epr->Metadata == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
metadata_item = epr->Metadata->any;
|
||||
for (i = g_list_first(metadata_item); i != NULL; i = g_list_next(i)) {
|
||||
if (LASSO_IS_IDWSF2_DISCO_SECURITY_CONTEXT(i->data)) {
|
||||
security_context = LASSO_IDWSF2_DISCO_SECURITY_CONTEXT(i->data);
|
||||
if (security_context->Token != NULL) {
|
||||
sec_token = security_context->Token->data;
|
||||
if (LASSO_IS_SAML2_ASSERTION(sec_token->any)) {
|
||||
lasso_assign_gobject(assertion, sec_token->any);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return assertion;
|
||||
}
|
||||
|
||||
void
|
||||
lasso_session_id_wsf2_init_eprs(LassoSession *session, xmlNode *t)
|
||||
{
|
||||
xmlNode *t2;
|
||||
|
||||
/* Endpoint References */
|
||||
if (strcmp((char*)t->name, "EndpointReferences") == 0) {
|
||||
t2 = t->children;
|
||||
while (t2) {
|
||||
LassoWsAddrEndpointReference *epr;
|
||||
if (t2->type != XML_ELEMENT_NODE) {
|
||||
t2 = t2->next;
|
||||
continue;
|
||||
}
|
||||
epr = LASSO_WSA_ENDPOINT_REFERENCE(
|
||||
lasso_wsa_endpoint_reference_new());
|
||||
LASSO_NODE_GET_CLASS(epr)->init_from_xml(LASSO_NODE(epr), t2);
|
||||
lasso_session_add_endpoint_reference(session, epr);
|
||||
g_object_unref(epr);
|
||||
t2 = t2->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
add_childnode_from_hashtable(G_GNUC_UNUSED gchar *key, LassoNode *value, DumpContext *context)
|
||||
{
|
||||
xmlNode *xmlnode;
|
||||
|
||||
xmlnode = context->parent;
|
||||
xmlAddChild(xmlnode, lasso_node_get_xmlNode(LASSO_NODE(value), TRUE));
|
||||
}
|
||||
|
||||
void
|
||||
lasso_session_id_wsf2_dump_eprs(LassoSession *session, xmlNode *xmlnode) {
|
||||
xmlNode *t;
|
||||
DumpContext context;
|
||||
|
||||
/* Endpoint References */
|
||||
if (session->private_data->eprs != NULL
|
||||
&& g_hash_table_size(session->private_data->eprs)) {
|
||||
t = xmlNewTextChild(xmlnode, NULL, (xmlChar*)"EndpointReferences", NULL);
|
||||
context.parent = t;
|
||||
g_hash_table_foreach(session->private_data->eprs,
|
||||
(GHFunc)add_childnode_from_hashtable, &context);
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_SESSION_H__
|
||||
#define __LASSO_IDWSF2_SESSION_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/session.h"
|
||||
#include "../xml/saml-2.0/saml2_assertion.h"
|
||||
#include "../xml/ws/wsa_endpoint_reference.h"
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_session_add_endpoint_reference(LassoSession *session,
|
||||
LassoWsAddrEndpointReference *epr);
|
||||
|
||||
LASSO_EXPORT LassoWsAddrEndpointReference* lasso_session_get_endpoint_reference(
|
||||
LassoSession *session, const gchar *service_type);
|
||||
|
||||
LASSO_EXPORT LassoSaml2Assertion* lasso_session_get_assertion_identity_token(
|
||||
LassoSession *session, const gchar *service_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_SESSION_H__ */
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_SERVERPRIVATE_H__
|
||||
#define __LASSO_IDWSF2_SERVERPRIVATE_H__
|
||||
|
||||
#include "../utils.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/session.h"
|
||||
#include <libxml/tree.h>
|
||||
|
||||
void lasso_session_id_wsf2_init_eprs(LassoSession *session, xmlNode *t);
|
||||
void lasso_session_id_wsf2_dump_eprs(LassoSession *session, xmlNode *xmlnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_SERVERPRIVATE_H__ */
|
|
@ -1,496 +0,0 @@
|
|||
/* $Id: wsf_profile.c,v 1.45 2007/01/05 16:11:02 Exp $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "soap_binding.h"
|
||||
#include "../xml/idwsf_strings.h"
|
||||
#include "../xml/id-wsf-2.0/idwsf2_strings.h"
|
||||
#include "../xml/id-wsf-2.0/sb2_sender.h"
|
||||
#include "../xml/id-wsf-2.0/sb2_redirect_request.h"
|
||||
#include "../xml/id-wsf-2.0/sb2_user_interaction_header.h"
|
||||
#include "../xml/ws/wsa_attributed_uri.h"
|
||||
|
||||
#include "../utils.h"
|
||||
|
||||
#define get_header(test) \
|
||||
GList *i = NULL; \
|
||||
\
|
||||
if (! LASSO_IS_SOAP_ENVELOPE(soap_envelope)) \
|
||||
return NULL; \
|
||||
if (! LASSO_IS_SOAP_HEADER(soap_envelope->Header)) \
|
||||
return NULL; \
|
||||
\
|
||||
i = soap_envelope->Header->Other; \
|
||||
for (; i != NULL; i = g_list_next(i)) { \
|
||||
if (test(i->data)) { \
|
||||
break; \
|
||||
} \
|
||||
}
|
||||
|
||||
inline static LassoNode* _get_node(GList **list, GType node_type, const char *node_name,
|
||||
const char *node_namespace, const char *node_prefix, gboolean create);
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_sb2_get_provider_id:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
*
|
||||
* Return the providerID contained in the sb2:Sender header.
|
||||
*
|
||||
* Return value: the providerID string or NULL if no sb2:Sender header is present.
|
||||
*/
|
||||
char *
|
||||
lasso_soap_envelope_sb2_get_provider_id(LassoSoapEnvelope *soap_envelope)
|
||||
{
|
||||
get_header(LASSO_IS_IDWSF2_SB2_SENDER);
|
||||
|
||||
if (i)
|
||||
return g_strdup(((LassoIdWsf2Sb2Sender*)i->data)->providerID);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_sb2_get_redirect_request_url:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
*
|
||||
* <para>Return the redirect request URL from the sb2:RedirectRequest SOAP Fault detail.</para>
|
||||
*
|
||||
* <para>The WSC MUST verify that this URL belong to the WSP. You can do this by comparing the domain
|
||||
* with the one in the @LassoProfile.msg_url field</para>
|
||||
* <para>The WSC MUST redirect the User Agent to this URL with a GET or POST request. It MUST add a
|
||||
* parameter named ReturnToURL giving the URL where the WSP will send the User Agent after the
|
||||
* interaction. It MAY add an IDP parameter indicating to the WSP how to authenticate the principal
|
||||
* if no preexisting session with the User Agent exists</para>
|
||||
*<para>The WSP must check that the ReturnToURL belon to the WSP, by using the providerID URL for example.</para>
|
||||
<para>After the interaction the WSC must redirect the User Agent to the ReturnToURL URL adding a parameter named ResendMessage. If ResendMessage is 0 or false, it means that the principal refused to continue the process. Any other value means that the prinicpal accepted and so the WSC can try again its request.</para>
|
||||
<para>In order to succeed the request need to refer to the SOAP Fault response containing the RedirectRequest element. See lasso_soap_envelope_get_relates_to(), and #LassoWsAddrAttributedURI.</para>
|
||||
*
|
||||
* Return value:(transfer none)(allow-none): the redirect URL string or NULL if no sb2:RedirectRequest detail is present.
|
||||
*/
|
||||
const char *
|
||||
lasso_soap_envelope_sb2_get_redirect_request_url(LassoSoapEnvelope *soap_envelope)
|
||||
{
|
||||
LassoSoapFault *fault;
|
||||
LassoIdWsf2Sb2RedirectRequest *redirect_request;
|
||||
|
||||
fault = lasso_soap_envelope_get_soap_fault(soap_envelope, FALSE);
|
||||
if (! fault || ! LASSO_IS_SOAP_DETAIL(fault->Detail))
|
||||
return NULL;
|
||||
|
||||
redirect_request = (LassoIdWsf2Sb2RedirectRequest*) _get_node(&fault->Detail->any, LASSO_TYPE_IDWSF2_SB2_REDIRECT_REQUEST, NULL, NULL, NULL, FALSE);
|
||||
if (! redirect_request)
|
||||
return NULL;
|
||||
return redirect_request->redirectURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_sb2_get_target_identity_header:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object.
|
||||
*
|
||||
* Return the first sb2:TargetIdentity header.
|
||||
*
|
||||
* Return value: (transfer none): the first #LassoIdWsf2Sb2TargetIdentity object found in the
|
||||
* headers of the @soap_envelope, or NULL if none is found.
|
||||
*/
|
||||
LassoIdWsf2Sb2TargetIdentity*
|
||||
lasso_soap_envelope_sb2_get_target_identity_header(LassoSoapEnvelope *soap_envelope)
|
||||
{
|
||||
get_header(LASSO_IS_IDWSF2_SB2_TARGET_IDENTITY);
|
||||
|
||||
if (i)
|
||||
return (LassoIdWsf2Sb2TargetIdentity*)i->data;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_wssec_get_security_header_impl:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
* @create: wether to create the header if not found
|
||||
*
|
||||
* Return value: (transfer none): the wsse:Security header found in the SOAP message, or NULL if
|
||||
* none is found, and creation was not allowed.
|
||||
*/
|
||||
static LassoWsSec1SecurityHeader*
|
||||
lasso_soap_envelope_wssec_get_security_header_impl(LassoSoapEnvelope *soap_envelope,
|
||||
gboolean create)
|
||||
{
|
||||
get_header(LASSO_IS_WSSE_SECURITY_HEADER);
|
||||
|
||||
if (i) {
|
||||
return (LassoWsSec1SecurityHeader*)i->data;
|
||||
}
|
||||
|
||||
if (create) {
|
||||
LassoWsSec1SecurityHeader *wssec_security = lasso_wsse_security_header_new();
|
||||
lasso_list_add_new_gobject (soap_envelope->Header->Other, wssec_security);
|
||||
return wssec_security;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_wssec_get_security_header:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
*
|
||||
* Return the first wsse:Security header found in the headers of @soap_envelope.
|
||||
*
|
||||
* Return value: (transfer none): the wsse:Security header found in the SOAP message, or NULL if
|
||||
* none is found.
|
||||
*/
|
||||
LassoWsSec1SecurityHeader*
|
||||
lasso_soap_envelope_wssec_get_security_header(LassoSoapEnvelope *soap_envelope)
|
||||
{
|
||||
return lasso_soap_envelope_wssec_get_security_header_impl (soap_envelope, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_add_security_token:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
* @token: a #LassoNode to use as a security token
|
||||
*
|
||||
* Add @token as a security token to the headers of @soap_envelope using a
|
||||
* #LassoWsSec1SecurityHeader element as a container. Eventually create the
|
||||
* #LassoWsSec1SecurityHeader element if it does not exist already.
|
||||
*/
|
||||
void
|
||||
lasso_soap_envelope_add_security_token(LassoSoapEnvelope *soap_envelope, LassoNode *token)
|
||||
{
|
||||
LassoWsSec1SecurityHeader *wssec_security;
|
||||
|
||||
wssec_security = lasso_soap_envelope_wssec_get_security_header_impl (soap_envelope, TRUE);
|
||||
g_return_if_fail (wssec_security != NULL);
|
||||
lasso_list_add_gobject(wssec_security->any, token);
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_get_saml2_security_token:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
*
|
||||
* Return a SAML2 Assertion used as a security token if one is found in the headers of
|
||||
* @soap_envelope.
|
||||
*
|
||||
* Return value: (transfer none): a #LassoSaml2Assertion, or NULL if none is found.
|
||||
*/
|
||||
LassoSaml2Assertion*
|
||||
lasso_soap_envelope_get_saml2_security_token(LassoSoapEnvelope *soap_envelope)
|
||||
{
|
||||
const LassoWsSec1SecurityHeader *security;
|
||||
GList *it;
|
||||
|
||||
security = lasso_soap_envelope_wssec_get_security_header (soap_envelope);
|
||||
if (! security)
|
||||
return NULL;
|
||||
lasso_foreach (it, security->any) {
|
||||
if (LASSO_IS_SAML2_ASSERTION (it->data)) {
|
||||
return (LassoSaml2Assertion*)g_object_ref(it->data);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_add_action_header:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
* @action: the action targeted by this message
|
||||
*
|
||||
* Add an action header to a #LassoSoapEnvelope object.
|
||||
*/
|
||||
void
|
||||
lasso_soap_envelope_add_action(LassoSoapEnvelope *soap_envelope, const char *action)
|
||||
{
|
||||
LassoWsAddrAttributedURI *wsa_action;
|
||||
|
||||
if (! LASSO_IS_SOAP_ENVELOPE(soap_envelope) || ! LASSO_IS_SOAP_HEADER(soap_envelope->Header))
|
||||
return;
|
||||
wsa_action = lasso_wsa_attributed_uri_new_with_string(action);
|
||||
lasso_node_set_custom_nodename(&wsa_action->parent, "Action");
|
||||
lasso_list_add_new_gobject(soap_envelope->Header->Other, wsa_action);
|
||||
}
|
||||
|
||||
const char*
|
||||
lasso_soap_envelope_get_action(LassoSoapEnvelope *soap_envelope)
|
||||
{
|
||||
GList *i;
|
||||
|
||||
if (! LASSO_IS_SOAP_ENVELOPE(soap_envelope) || ! LASSO_IS_SOAP_HEADER(soap_envelope->Header))
|
||||
return NULL;
|
||||
|
||||
lasso_foreach(i, soap_envelope->Header->Other) {
|
||||
if (LASSO_IS_WSA_ATTRIBUTED_URI(i->data)
|
||||
&& lasso_strisequal(lasso_node_get_name((LassoNode *)i->data),"Action")) {
|
||||
return ((LassoWsAddrAttributedURI*)i->data)->content;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_add_to_body:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
* @content: a #LassoNode object to add to the body of the SOAP message
|
||||
*
|
||||
* Add new content to the SOAP message body.
|
||||
*/
|
||||
void
|
||||
lasso_soap_envelope_add_to_body(LassoSoapEnvelope *soap_envelope, LassoNode *content)
|
||||
{
|
||||
if (!LASSO_IS_SOAP_ENVELOPE(soap_envelope) || !LASSO_IS_SOAP_BODY(soap_envelope->Body))
|
||||
return;
|
||||
lasso_list_add_gobject(soap_envelope->Body->any, content);
|
||||
}
|
||||
|
||||
inline static LassoNode*
|
||||
_get_node(GList **list, GType node_type, const char *node_name, const char *node_namespace,
|
||||
const char *node_prefix, gboolean create)
|
||||
{
|
||||
GList *i;
|
||||
|
||||
lasso_foreach(i, (*list)) {
|
||||
LassoNode *node = (LassoNode*)i->data;
|
||||
|
||||
if (LASSO_IS_NODE(node) &&
|
||||
(! node_type || ( G_IS_OBJECT(node) && G_OBJECT_TYPE(node) == node_type)) &&
|
||||
(! node_name || lasso_strisequal(lasso_node_get_name(node),node_name)) &&
|
||||
(! node_namespace ||
|
||||
lasso_strisequal(lasso_node_get_namespace(node),node_namespace))) {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
if (create) {
|
||||
LassoNode *node = (LassoNode*)g_object_new(node_type, NULL);
|
||||
if (! node) {
|
||||
return NULL;
|
||||
}
|
||||
if (lasso_strisnotequal(lasso_node_get_name(node),node_name)) {
|
||||
lasso_node_set_custom_nodename(node, node_name);
|
||||
}
|
||||
if (lasso_strisequal(lasso_node_get_namespace(node),node_namespace)) {
|
||||
lasso_node_set_custom_namespace(node, node_namespace, node_prefix);
|
||||
}
|
||||
lasso_list_add_new_gobject(*list, node);
|
||||
return node;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LassoNode*
|
||||
_lasso_soap_envelope_get_header(LassoSoapEnvelope *soap_envelope, GType node_type,
|
||||
const char *node_name, const char *node_namespace, const char *node_prefix,
|
||||
gboolean create)
|
||||
{
|
||||
if (! LASSO_IS_SOAP_ENVELOPE(soap_envelope) || !
|
||||
LASSO_IS_SOAP_HEADER(soap_envelope->Header)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return _get_node(&soap_envelope->Header->Other, node_type, node_name, node_namespace,
|
||||
node_prefix, create);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_get_message_id:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
* @create:(default FALSE): whether to create the node if it is not found
|
||||
*
|
||||
* Return the WS-Addressing header MessageID content.
|
||||
*
|
||||
* Return value:(transfer none): a #LassoWsAddrAttributedURI object or NULL if none is found, and
|
||||
* creation was not allowed.
|
||||
*/
|
||||
LassoWsAddrAttributedURI*
|
||||
lasso_soap_envelope_get_message_id(LassoSoapEnvelope *soap_envelope, gboolean create)
|
||||
{
|
||||
return (LassoWsAddrAttributedURI*)_lasso_soap_envelope_get_header(soap_envelope,
|
||||
LASSO_TYPE_WSA_ATTRIBUTED_URI, LASSO_WSA_ELEMENT_MESSAGE_ID, NULL, NULL,
|
||||
create);
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_get_relates_to:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
* @create:(default FALSE): whether to create the node if it is not found
|
||||
*
|
||||
*
|
||||
* Returns the RelatesTo WS-Addressing header, if it exists.
|
||||
*
|
||||
* Return value:(transfer none): a #LassoWsAddrAttributedURI object or NULL if none is found, and creation was not allowed.
|
||||
*/
|
||||
LassoWsAddrRelatesTo*
|
||||
lasso_soap_envelope_get_relates_to(LassoSoapEnvelope *soap_envelope, gboolean create)
|
||||
{
|
||||
return (LassoWsAddrRelatesTo*)_lasso_soap_envelope_get_header(soap_envelope,
|
||||
LASSO_TYPE_WSA_RELATES_TO, NULL, NULL, NULL, create);
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_set_relates_to:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
* @value:(allow-none): the value to set into the new header
|
||||
* @relationship:(allow-none): kind of the relationship
|
||||
*
|
||||
* Set the value of the RelatesTo header, if it does not exist it is created. If @value is NULL, the
|
||||
* header is removed.
|
||||
*/
|
||||
void
|
||||
lasso_soap_envelope_set_relates_to(LassoSoapEnvelope *soap_envelope, char *value, char *relationship)
|
||||
{
|
||||
LassoWsAddrRelatesTo *relates_to;
|
||||
if (! LASSO_IS_SOAP_ENVELOPE(soap_envelope))
|
||||
return;
|
||||
|
||||
|
||||
relates_to = lasso_soap_envelope_get_relates_to(soap_envelope, TRUE);
|
||||
if (value) {
|
||||
g_return_if_fail(relates_to);
|
||||
lasso_assign_string(relates_to->content, value);
|
||||
lasso_assign_string(relates_to->RelationshipType, relationship);
|
||||
} else if (relates_to) {
|
||||
lasso_list_remove_gobject(soap_envelope->Header->Other, relates_to);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_get_body_content:
|
||||
* @soap_envelope: a #LassoSoapEnvelope object
|
||||
*
|
||||
* Return the body content of the @soap_envelope object.
|
||||
*
|
||||
* Return value:(element-type LassoNode): the content or NULL if the concent is empty or the object invalid.
|
||||
*/
|
||||
GList*
|
||||
lasso_soap_envelope_get_body_content(LassoSoapEnvelope *soap_envelope) {
|
||||
if (LASSO_IS_SOAP_ENVELOPE(soap_envelope) && LASSO_IS_SOAP_BODY(soap_envelope->Body))
|
||||
return soap_envelope->Body->any;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LassoSoapDetail *
|
||||
lasso_soap_fault_get_detail(LassoSoapFault *soap_fault, gboolean create)
|
||||
{
|
||||
if (! LASSO_IS_SOAP_FAULT(soap_fault))
|
||||
return NULL;
|
||||
|
||||
if (soap_fault->Detail == NULL && create) {
|
||||
soap_fault->Detail = lasso_soap_detail_new();
|
||||
}
|
||||
return soap_fault->Detail;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_soap_fault_add_to_detail:
|
||||
* @soap_fault: a #LassoSoapFault object
|
||||
* @node: a node to add to the Detail sub-element of the @soap_fault object.
|
||||
*
|
||||
* Fill the detail part of a SOAP fault.
|
||||
*/
|
||||
void
|
||||
lasso_soap_fault_add_to_detail(LassoSoapFault *soap_fault,
|
||||
LassoNode *node)
|
||||
{
|
||||
LassoSoapDetail *detail;
|
||||
|
||||
detail = lasso_soap_fault_get_detail(soap_fault, TRUE);
|
||||
if (detail) {
|
||||
lasso_list_add_gobject(detail->any, node);
|
||||
}
|
||||
}
|
||||
|
||||
LassoIdWsf2Sb2UserInteractionHeader *
|
||||
lasso_soap_envelope_get_sb2_user_interaction_header(LassoSoapEnvelope *soap_envelope, gboolean create)
|
||||
{
|
||||
return (LassoIdWsf2Sb2UserInteractionHeader*)_lasso_soap_envelope_get_header(soap_envelope,
|
||||
LASSO_TYPE_IDWSF2_SB2_USER_INTERACTION_HEADER, NULL, NULL, NULL,
|
||||
create);
|
||||
}
|
||||
|
||||
LassoIdWsf2Sb2UserInteractionHint
|
||||
lasso_soap_envelope_get_sb2_user_interaction_hint(LassoSoapEnvelope *soap_envelope)
|
||||
{
|
||||
const char *hint;
|
||||
LassoIdWsf2Sb2UserInteractionHeader *header;
|
||||
|
||||
header = lasso_soap_envelope_get_sb2_user_interaction_header(soap_envelope, FALSE);
|
||||
if (header) {
|
||||
hint = header->interact;
|
||||
if (lasso_strisequal(hint,LASSO_SB2_USER_INTERACTION_INTERACT_IF_NEEDED))
|
||||
return LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_INTERACT_IF_NEEDED;
|
||||
if (lasso_strisequal(hint,LASSO_SB2_USER_INTERACTION_DO_NOT_INTERACT))
|
||||
return LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_DO_NOT_INTERACT;
|
||||
if (lasso_strisequal(hint,LASSO_SB2_USER_INTERACTION_DO_NOT_INTERACT_FOR_DATA))
|
||||
return LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_DO_NOT_INTERACT_FOR_DATA;
|
||||
|
||||
}
|
||||
return LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_NONE;
|
||||
}
|
||||
|
||||
void
|
||||
lasso_soap_envelope_set_sb2_user_interaction_hint(LassoSoapEnvelope *soap_envelope,
|
||||
LassoIdWsf2Sb2UserInteractionHint hint)
|
||||
{
|
||||
LassoIdWsf2Sb2UserInteractionHeader *user_interaction;
|
||||
|
||||
user_interaction = lasso_soap_envelope_get_sb2_user_interaction_header(soap_envelope, TRUE);
|
||||
switch (hint) {
|
||||
case LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_INTERACT_IF_NEEDED:
|
||||
lasso_assign_string(user_interaction->interact,
|
||||
LASSO_SB2_USER_INTERACTION_INTERACT_IF_NEEDED);
|
||||
break;
|
||||
case LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_DO_NOT_INTERACT:
|
||||
lasso_assign_string(user_interaction->interact,
|
||||
LASSO_SB2_USER_INTERACTION_DO_NOT_INTERACT);
|
||||
break;
|
||||
case LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_DO_NOT_INTERACT_FOR_DATA:
|
||||
lasso_assign_string(user_interaction->interact,
|
||||
LASSO_SB2_USER_INTERACTION_DO_NOT_INTERACT_FOR_DATA);
|
||||
break;
|
||||
default:
|
||||
lasso_release_string(user_interaction->interact);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_soap_envelope_get_soap_fault:
|
||||
* @soap_envelope: a #LassoSoapEnvelope
|
||||
* @create:(default FALSE): whether to create the SOAP Fault
|
||||
*
|
||||
* Return the first SOAP Fault in the Body of the soap message @soap_envelope.
|
||||
*
|
||||
* Return value:(transfer none)(allow-none): a #LassoSoapFault object or NULL.
|
||||
*/
|
||||
LassoSoapFault*
|
||||
lasso_soap_envelope_get_soap_fault(LassoSoapEnvelope *soap_envelope, gboolean create)
|
||||
{
|
||||
LassoSoapFault *fault;
|
||||
|
||||
if (! LASSO_IS_SOAP_ENVELOPE(soap_envelope) || ! LASSO_SOAP_BODY(soap_envelope->Body))
|
||||
return NULL;
|
||||
|
||||
fault = (LassoSoapFault*)_get_node(&soap_envelope->Body->any, LASSO_TYPE_SOAP_FAULT, NULL, NULL, NULL, create);
|
||||
|
||||
return fault;
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
/* $Id: wsf_profile.h,v 1.13 2006/11/14 17:07:30 Exp $
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDWSF2_SOAP_BINDING_H__
|
||||
#define __LASSO_IDWSF2_SOAP_BINDING_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../export.h"
|
||||
#include "../xml/soap-1.1/soap_envelope.h"
|
||||
#include "../xml/soap-1.1/soap_fault.h"
|
||||
#include "../xml/id-wsf-2.0/sb2_target_identity.h"
|
||||
#include "../xml/id-wsf-2.0/sb2_user_interaction_header.h"
|
||||
#include "../xml/ws/wsse_security_header.h"
|
||||
#include "../xml/ws/wsa_attributed_uri.h"
|
||||
#include "../xml/ws/wsa_relates_to.h"
|
||||
#include "../xml/saml-2.0/saml2_assertion.h"
|
||||
|
||||
typedef enum {
|
||||
LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_NONE,
|
||||
LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_INTERACT_IF_NEEDED,
|
||||
LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_DO_NOT_INTERACT,
|
||||
LASSO_IDWSF2_SB2_USER_INTERACTION_HINT_DO_NOT_INTERACT_FOR_DATA
|
||||
} LassoIdWsf2Sb2UserInteractionHint;
|
||||
|
||||
LASSO_EXPORT char* lasso_soap_envelope_sb2_get_provider_id(LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT const char* lasso_soap_envelope_sb2_get_redirect_request_url(
|
||||
LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT LassoIdWsf2Sb2TargetIdentity* lasso_soap_envelope_sb2_get_target_identity_header(
|
||||
LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT LassoWsSec1SecurityHeader* lasso_soap_envelope_wssec_get_security_header(
|
||||
LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT void lasso_soap_envelope_add_security_token(LassoSoapEnvelope *soap_envelope,
|
||||
LassoNode *token);
|
||||
|
||||
LASSO_EXPORT LassoSaml2Assertion *lasso_soap_envelope_get_saml2_security_token(
|
||||
LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT const char* lasso_soap_envelope_get_action(LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT void lasso_soap_envelope_add_to_body(LassoSoapEnvelope *soap_envelope,
|
||||
LassoNode *content);
|
||||
|
||||
LASSO_EXPORT LassoWsAddrAttributedURI *lasso_soap_envelope_get_message_id(
|
||||
LassoSoapEnvelope *soap_envelope, gboolean create);
|
||||
|
||||
LASSO_EXPORT LassoWsAddrRelatesTo *lasso_soap_envelope_get_relates_to(LassoSoapEnvelope *envelope,
|
||||
gboolean create);
|
||||
|
||||
LASSO_EXPORT GList* lasso_soap_envelope_get_body_content(LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT void lasso_soap_fault_add_to_detail(LassoSoapFault *soap_fault,
|
||||
LassoNode *node);
|
||||
|
||||
LASSO_EXPORT LassoIdWsf2Sb2UserInteractionHeader *
|
||||
lasso_soap_envelope_get_sb2_user_interaction_header(
|
||||
LassoSoapEnvelope *soap_envelope, gboolean create);
|
||||
|
||||
LASSO_EXPORT LassoIdWsf2Sb2UserInteractionHint
|
||||
lasso_soap_envelope_get_sb2_user_interaction_hint( LassoSoapEnvelope *soap_envelope);
|
||||
|
||||
LASSO_EXPORT void lasso_soap_envelope_set_sb2_user_interaction_hint(
|
||||
LassoSoapEnvelope *soap_envelope, LassoIdWsf2Sb2UserInteractionHint hint);
|
||||
|
||||
LASSO_EXPORT void lasso_soap_envelope_add_action(LassoSoapEnvelope *soap_envelope,
|
||||
const char *action);
|
||||
|
||||
LASSO_EXPORT LassoSoapDetail *lasso_soap_fault_get_detail(LassoSoapFault *soap_fault,
|
||||
gboolean create);
|
||||
|
||||
LASSO_EXPORT LassoSoapFault* lasso_soap_envelope_get_soap_fault(LassoSoapEnvelope *soap_envelope,
|
||||
gboolean create);
|
||||
|
||||
LASSO_EXPORT void lasso_soap_envelope_set_relates_to(LassoSoapEnvelope *soap_envelope, char *value, char *relationship);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_IDWSF2_SOAP_BINDING_H__ */
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
liblassoincludedir = $(includedir)/lasso/id-wsf
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_builddir) \
|
||||
-I$(top_srcdir) \
|
||||
$(LASSO_CORE_CFLAGS) \
|
||||
-DG_LOG_DOMAIN=\"lasso\"
|
||||
|
||||
lasso_private_h_sources = \
|
||||
wsf_profile_private.h \
|
||||
id_ff_extensions_private.h
|
||||
|
||||
if WSF_ENABLED
|
||||
noinst_LTLIBRARIES = liblasso-id-wsf.la
|
||||
WSF_C_FILES = \
|
||||
authentication.c \
|
||||
discovery.c \
|
||||
interaction_profile_service.c \
|
||||
personal_profile_service.c \
|
||||
data_service.c \
|
||||
wsf_profile.c \
|
||||
wsf_utils.c \
|
||||
id_ff_extensions.c
|
||||
|
||||
WSF_H_FILES = \
|
||||
id_wsf.h \
|
||||
authentication.h \
|
||||
discovery.h \
|
||||
interaction_profile_service.h \
|
||||
personal_profile_service.h \
|
||||
data_service.h \
|
||||
wsf_profile.h \
|
||||
wsf_utils.h \
|
||||
id_ff_extensions.h
|
||||
endif
|
||||
|
||||
liblasso_id_wsf_la_SOURCES = $(WSF_C_FILES)
|
||||
|
||||
liblassoinclude_HEADERS = $(WSF_H_FILES)
|
||||
|
||||
EXTRA_DIST = $(lasso_private_h_sources)
|
|
@ -1,762 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../utils.h"
|
||||
#include "authentication.h"
|
||||
#include "../xml/idwsf_strings.h"
|
||||
#include "../xml/private.h"
|
||||
#include "../xml/sa_sasl_request.h"
|
||||
#include "../xml/sa_sasl_response.h"
|
||||
#include "../xml/soap_binding_correlation.h"
|
||||
#include <xmlsec/base64.h>
|
||||
|
||||
/**
|
||||
* SECTION:idwsf_authentication
|
||||
* @short_description: ID-WSF 1.0 Authentication service
|
||||
* @stability: Unstable
|
||||
*
|
||||
* The authentication service allows to authenticate uniformly using a SOAP encapsulated SASL
|
||||
* service. Ideally you can use any SASL profile.
|
||||
*/
|
||||
|
||||
/* SASL client callbacks (for secret, login, password, ... ) */
|
||||
static sasl_callback_t lasso_sasl_callbacks[5];
|
||||
|
||||
static int
|
||||
lasso_sasl_cb_log(G_GNUC_UNUSED void* context, G_GNUC_UNUSED int priority, G_GNUC_UNUSED const char* message)
|
||||
{
|
||||
return SASL_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
lasso_sasl_cb_authname(void* context, G_GNUC_UNUSED int id, const char** result, unsigned* len)
|
||||
{
|
||||
LassoUserAccount *account;
|
||||
int ret = SASL_FAIL;
|
||||
|
||||
*result = NULL;
|
||||
if (len) *len = 0;
|
||||
|
||||
account = (LassoUserAccount *)context;
|
||||
if (account != NULL && account->login != NULL) {
|
||||
*result = g_strdup(account->login);
|
||||
if (len) *len = strlen(account->login);
|
||||
ret = SASL_OK;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
lasso_sasl_cb_pass(G_GNUC_UNUSED sasl_conn_t* conn, void* context, G_GNUC_UNUSED int id, sasl_secret_t** psecret)
|
||||
{
|
||||
static sasl_secret_t *s;
|
||||
LassoUserAccount *account;
|
||||
int ret = SASL_FAIL;
|
||||
|
||||
account = (LassoUserAccount *)context;
|
||||
if (account != NULL && account->password != NULL) {
|
||||
s = (sasl_secret_t*) g_malloc0(sizeof(sasl_secret_t) + strlen(account->password));
|
||||
|
||||
strcpy((char*)s->data, account->password);
|
||||
s->len = strlen(account->password);
|
||||
|
||||
*psecret = s;
|
||||
|
||||
ret = SASL_OK;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct _LassoAuthenticationPrivate
|
||||
{
|
||||
gboolean dispose_has_run;
|
||||
};
|
||||
|
||||
static LassoSoapEnvelope*
|
||||
lasso_authentication_build_soap_envelope_internal(const char *refToMessageId,
|
||||
const char *providerId)
|
||||
{
|
||||
LassoSoapEnvelope *envelope;
|
||||
LassoSoapHeader *header;
|
||||
LassoSoapBody *body;
|
||||
LassoSoapBindingCorrelation *correlation;
|
||||
gchar *messageId, *timestamp;
|
||||
|
||||
/* Body */
|
||||
body = lasso_soap_body_new();
|
||||
body->Id = lasso_build_unique_id(32);
|
||||
envelope = lasso_soap_envelope_new(body);
|
||||
|
||||
/* Header */
|
||||
header = lasso_soap_header_new();
|
||||
envelope->Header = header;
|
||||
|
||||
/* Correlation */
|
||||
messageId = lasso_build_unique_id(32);
|
||||
timestamp = lasso_get_current_time();
|
||||
correlation = lasso_soap_binding_correlation_new(messageId, timestamp);
|
||||
correlation->id = lasso_build_unique_id(32);
|
||||
if (refToMessageId != NULL)
|
||||
correlation->refToMessageID = g_strdup(refToMessageId);
|
||||
header->Other = g_list_append(header->Other, correlation);
|
||||
|
||||
/* Provider */
|
||||
if (providerId) {
|
||||
LassoSoapBindingProvider *provider = lasso_soap_binding_provider_new(providerId);
|
||||
provider->id = lasso_build_unique_id(32);
|
||||
header->Other = g_list_append(header->Other, provider);
|
||||
}
|
||||
|
||||
return envelope;
|
||||
}
|
||||
gint
|
||||
lasso_authentication_client_start(LassoAuthentication *authentication)
|
||||
{
|
||||
LassoSaSASLRequest *request;
|
||||
int res;
|
||||
const char *mechusing;
|
||||
const char *out;
|
||||
unsigned int outlen = 0;
|
||||
xmlChar *outbase64;
|
||||
|
||||
/* Liberty part */
|
||||
request = LASSO_SA_SASL_REQUEST(LASSO_WSF_PROFILE(authentication)->request);
|
||||
|
||||
/* sasl part */
|
||||
res = sasl_client_start(authentication->connection, /* same context from above */
|
||||
request->mechanism, /* list of mechanisms from the server */
|
||||
NULL, /* filled in if an interaction is needed */
|
||||
&out, /* filled in on success */
|
||||
&outlen, /* filled in on success */
|
||||
&mechusing);
|
||||
|
||||
/* mechusing is th resulting best mech to use, so copy it in SASLRequest element */
|
||||
if (mechusing != NULL) {
|
||||
lasso_release(request->mechanism);
|
||||
request->mechanism = g_strdup(mechusing);
|
||||
}
|
||||
|
||||
if (outlen > 0) {
|
||||
outbase64 = xmlSecBase64Encode((xmlChar*)out, outlen, 0);
|
||||
request->Data = g_list_append(request->Data, g_strdup((char*)outbase64));
|
||||
xmlFree(outbase64);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
gint
|
||||
lasso_authentication_client_step(LassoAuthentication *authentication)
|
||||
{
|
||||
LassoSaSASLRequest *request;
|
||||
LassoSaSASLResponse *response;
|
||||
int res = 0;
|
||||
xmlChar *in = NULL;
|
||||
int inlen = 0;
|
||||
xmlChar *inbase64 = NULL;
|
||||
|
||||
xmlChar *outbase64;
|
||||
const char *out;
|
||||
unsigned int outlen = 0;
|
||||
|
||||
/* Liberty part */
|
||||
request = LASSO_SA_SASL_REQUEST(LASSO_WSF_PROFILE(authentication)->request);
|
||||
response = LASSO_SA_SASL_RESPONSE(LASSO_WSF_PROFILE(authentication)->response);
|
||||
|
||||
/* sasl part */
|
||||
|
||||
if (response->Data != NULL && response->Data->data != NULL) {
|
||||
inbase64 = response->Data->data;
|
||||
in = g_malloc(strlen((char*)inbase64));
|
||||
inlen = xmlSecBase64Decode(inbase64, in, strlen((char*)inbase64));
|
||||
|
||||
res = sasl_client_step(authentication->connection, /* our context */
|
||||
(char*)in, /* the data from the server */
|
||||
inlen, /* its length */
|
||||
NULL, /* prompt_need */
|
||||
&out, /* client response */
|
||||
&outlen); /* its length */
|
||||
if (outlen > 0) {
|
||||
outbase64 = xmlSecBase64Encode((xmlChar*)out, outlen, 0);
|
||||
request->Data = g_list_append(request->Data, g_strdup((char*)outbase64));
|
||||
xmlFree(outbase64);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
void
|
||||
lasso_authentication_destroy(LassoAuthentication *authentication)
|
||||
{
|
||||
lasso_node_destroy(LASSO_NODE(authentication));
|
||||
}
|
||||
|
||||
char*
|
||||
lasso_authentication_get_mechanism_list(LassoAuthentication *authentication)
|
||||
{
|
||||
int res;
|
||||
const char *result_string;
|
||||
unsigned int string_length;
|
||||
int number_of_mechanisms;
|
||||
|
||||
if (authentication->connection == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
res = sasl_listmech(authentication->connection, /* The context for this connection */
|
||||
NULL, /* not supported */
|
||||
"", /* What to prepend the string with */
|
||||
" ", /* What to separate mechanisms with */
|
||||
"", /* What to append to the string */
|
||||
&result_string, /* The produced string. */
|
||||
&string_length, /* length of the string */
|
||||
&number_of_mechanisms); /* Number of mechanisms in
|
||||
the string */
|
||||
if (result_string == NULL)
|
||||
return NULL;
|
||||
|
||||
return g_strdup(result_string);
|
||||
}
|
||||
|
||||
gint
|
||||
lasso_authentication_init_request(LassoAuthentication *authentication,
|
||||
LassoDiscoDescription *description,
|
||||
const gchar *mechanisms,
|
||||
LassoUserAccount *account)
|
||||
{
|
||||
LassoSoapEnvelope *envelope;
|
||||
LassoSaSASLRequest *request;
|
||||
int res;
|
||||
|
||||
/* global callback for every connection */
|
||||
static sasl_callback_t global_callbacks[2];
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(LASSO_IS_DISCO_DESCRIPTION(description),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(mechanisms != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
|
||||
if (description->Endpoint != NULL) {
|
||||
LASSO_WSF_PROFILE(authentication)->msg_url = g_strdup(description->Endpoint);
|
||||
} else if (description->WsdlURI != NULL) {
|
||||
|
||||
}
|
||||
|
||||
/* liberty-idwsf-authn-svc-1.1.pdf - page 13 - lignes 342 / 343 :
|
||||
In the case where a single SASL mechanism name is conveyed, the <SASLRequest> message
|
||||
can contain a so-called initial response (see Section 5.1 of [RFC2222]) in the <Data>
|
||||
element. */
|
||||
request = lasso_sa_sasl_request_new(mechanisms);
|
||||
LASSO_WSF_PROFILE(authentication)->request = LASSO_NODE(request);
|
||||
|
||||
envelope = lasso_authentication_build_soap_envelope_internal(NULL, NULL);
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_request = envelope;
|
||||
if (envelope == NULL || envelope->Body == NULL || envelope->Body->any == NULL) {
|
||||
return critical_error(LASSO_PROFILE_ERROR_MISSING_REQUEST);
|
||||
}
|
||||
envelope->Body->any = g_list_append(envelope->Body->any, request);
|
||||
|
||||
/* set up default logging callback */
|
||||
global_callbacks[0].id = SASL_CB_LOG;
|
||||
global_callbacks[0].proc = lasso_sasl_cb_log;
|
||||
global_callbacks[0].context = NULL;
|
||||
|
||||
global_callbacks[1].id = SASL_CB_LIST_END;
|
||||
global_callbacks[1].proc = NULL;
|
||||
global_callbacks[1].context = NULL;
|
||||
|
||||
sasl_client_init(global_callbacks);
|
||||
|
||||
/* sasl client new connection */
|
||||
{
|
||||
sasl_callback_t* callback;
|
||||
|
||||
callback = lasso_sasl_callbacks;
|
||||
|
||||
callback->id = SASL_CB_AUTHNAME;
|
||||
callback->proc = &lasso_sasl_cb_authname;
|
||||
callback->context = account;
|
||||
callback++;
|
||||
|
||||
callback->id = SASL_CB_USER;
|
||||
callback->proc = &lasso_sasl_cb_authname;
|
||||
callback->context = account;
|
||||
callback++;
|
||||
|
||||
callback->id = SASL_CB_PASS;
|
||||
callback->proc = &lasso_sasl_cb_pass;
|
||||
callback->context = account;
|
||||
callback++;
|
||||
|
||||
callback->id = SASL_CB_GETREALM;
|
||||
callback->proc = NULL;
|
||||
callback->context = NULL;
|
||||
callback++;
|
||||
|
||||
callback->id = SASL_CB_LIST_END;
|
||||
callback->proc = NULL;
|
||||
callback->context = NULL;
|
||||
}
|
||||
|
||||
res = sasl_client_new(LASSO_SA_SASL_SERVICE_NAME,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
lasso_sasl_callbacks, /* new connection callbacks (log, ...) */
|
||||
0,
|
||||
&authentication->connection);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
gint
|
||||
lasso_authentication_process_request_msg(LassoAuthentication *authentication,
|
||||
const gchar *soap_msg)
|
||||
{
|
||||
LassoSoapEnvelope *envelope;
|
||||
LassoSaSASLResponse *response;
|
||||
LassoUtilityStatus *status;
|
||||
LassoSoapBindingCorrelation *correlation;
|
||||
gchar *messageId;
|
||||
int res = 0;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(soap_msg != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
/* if a previous request and response, then remove */
|
||||
if (LASSO_IS_SOAP_ENVELOPE(LASSO_WSF_PROFILE(authentication)->soap_envelope_response) \
|
||||
== TRUE) {
|
||||
lasso_node_destroy(LASSO_NODE(LASSO_WSF_PROFILE(authentication)->\
|
||||
soap_envelope_response));
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_response = NULL;
|
||||
LASSO_WSF_PROFILE(authentication)->response = NULL;
|
||||
}
|
||||
|
||||
if (LASSO_IS_SOAP_ENVELOPE(LASSO_WSF_PROFILE(authentication)->soap_envelope_request) \
|
||||
== TRUE) {
|
||||
lasso_node_destroy(LASSO_NODE(LASSO_WSF_PROFILE(authentication)->\
|
||||
soap_envelope_request));
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_request = NULL;
|
||||
LASSO_WSF_PROFILE(authentication)->request = NULL;
|
||||
}
|
||||
|
||||
envelope = LASSO_SOAP_ENVELOPE(lasso_node_new_from_dump(soap_msg));
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_request = envelope;
|
||||
LASSO_WSF_PROFILE(authentication)->request = LASSO_NODE(envelope->Body->any->data);
|
||||
|
||||
correlation = envelope->Header->Other->data;
|
||||
messageId = correlation->messageID;
|
||||
envelope = lasso_authentication_build_soap_envelope_internal(messageId, NULL);
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_response = envelope;
|
||||
|
||||
status = lasso_utility_status_new(LASSO_SA_STATUS_CODE_OK);
|
||||
response = lasso_sa_sasl_response_new(status);
|
||||
LASSO_WSF_PROFILE(authentication)->response = LASSO_NODE(response);
|
||||
if (envelope == NULL || envelope->Body == NULL || envelope->Body->any == NULL) {
|
||||
return critical_error(LASSO_PROFILE_ERROR_MISSING_RESPONSE);
|
||||
}
|
||||
envelope->Body->any = g_list_append(envelope->Body->any, response);
|
||||
|
||||
/* liberty-idwsf-authn-svc-1.1.pdf - page 13 - lignes 359 / 361 :
|
||||
<SASLRequest> message with multiple mechanism MUST NOT contain any "initial response"
|
||||
data, and MUST be the initial SASL request. See Section 4.5.2.1.2 for details on the
|
||||
returned <SASLResponse> message in this case. */
|
||||
|
||||
/* liberty-idwsf-authn-svc-1.1.pdf - page 13 - lignes 380 / 384 :
|
||||
A NULL string ("") in mechanism list SASLRequest indicates to the authentication server
|
||||
that the client wishes to abort the authentication exchange. */
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
gint
|
||||
lasso_authentication_process_response_msg(LassoAuthentication *authentication,
|
||||
const gchar *soap_msg)
|
||||
{
|
||||
LassoSoapEnvelope *envelope;
|
||||
LassoSaSASLRequest *request;
|
||||
LassoSaSASLResponse *response;
|
||||
LassoSoapBindingCorrelation *correlation;
|
||||
gchar *messageId;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(soap_msg != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
/* if a previous request or response, remove */
|
||||
if (LASSO_IS_SOAP_ENVELOPE(LASSO_WSF_PROFILE(authentication)->soap_envelope_request) \
|
||||
== TRUE) {
|
||||
lasso_node_destroy(LASSO_NODE(LASSO_WSF_PROFILE(authentication)->\
|
||||
soap_envelope_request));
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_request = NULL;
|
||||
LASSO_WSF_PROFILE(authentication)->request = NULL;
|
||||
}
|
||||
|
||||
if (LASSO_IS_SOAP_ENVELOPE(LASSO_WSF_PROFILE(authentication)->soap_envelope_response) \
|
||||
== TRUE) {
|
||||
lasso_node_destroy(LASSO_NODE(LASSO_WSF_PROFILE(authentication)->\
|
||||
soap_envelope_response));
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_response = NULL;
|
||||
LASSO_WSF_PROFILE(authentication)->response = NULL;
|
||||
}
|
||||
|
||||
envelope = LASSO_SOAP_ENVELOPE(lasso_node_new_from_dump(soap_msg));
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_response = envelope;
|
||||
|
||||
if (envelope == NULL || envelope->Body == NULL || envelope->Body->any == NULL) {
|
||||
return critical_error(LASSO_PROFILE_ERROR_MISSING_RESPONSE);
|
||||
}
|
||||
response = envelope->Body->any->data;
|
||||
if (response == NULL) {
|
||||
return critical_error(LASSO_PROFILE_ERROR_MISSING_RESPONSE);
|
||||
}
|
||||
LASSO_WSF_PROFILE(authentication)->response = LASSO_NODE(response);
|
||||
|
||||
if (response->Status == NULL || response->Status->code == NULL) {
|
||||
return critical_error(LASSO_PROFILE_ERROR_MISSING_STATUS_CODE);
|
||||
}
|
||||
|
||||
/* if continue, init another request */
|
||||
if (g_str_equal(response->Status->code, LASSO_SA_STATUS_CODE_CONTINUE) == TRUE) {
|
||||
correlation = envelope->Header->Other->data;
|
||||
messageId = correlation->messageID;
|
||||
|
||||
envelope = lasso_authentication_build_soap_envelope_internal(messageId, NULL);
|
||||
LASSO_WSF_PROFILE(authentication)->soap_envelope_request = envelope;
|
||||
|
||||
request = lasso_sa_sasl_request_new(g_strdup(response->serverMechanism));
|
||||
LASSO_WSF_PROFILE(authentication)->request = LASSO_NODE(request);
|
||||
|
||||
envelope->Body->any = g_list_append(envelope->Body->any, request);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
gint
|
||||
lasso_authentication_server_start(LassoAuthentication *authentication)
|
||||
{
|
||||
LassoSaSASLRequest *request;
|
||||
LassoSaSASLResponse *response;
|
||||
|
||||
gchar *mechanisms, *chosen;
|
||||
gchar **server_mech_list, **client_mech_list, **smech, **cmech;
|
||||
int nbmech;
|
||||
|
||||
char *inbase64;
|
||||
xmlChar *outbase64;
|
||||
|
||||
char *in = NULL;
|
||||
int inlen = 0;
|
||||
|
||||
const char *out;
|
||||
unsigned int outlen = 0;
|
||||
|
||||
int res = 0;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
|
||||
res = sasl_server_init(NULL, "Lasso"); /* FIXME : should be a param */
|
||||
res = sasl_server_new(LASSO_SA_SASL_SERVICE_NAME,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
&authentication->connection);
|
||||
|
||||
/* Liberty part */
|
||||
request = LASSO_SA_SASL_REQUEST(LASSO_WSF_PROFILE(authentication)->request);
|
||||
response = LASSO_SA_SASL_RESPONSE(LASSO_WSF_PROFILE(authentication)->response);
|
||||
|
||||
/* if mechanism is NULL, then abort authentication exchange */
|
||||
chosen = NULL;
|
||||
nbmech = 0;
|
||||
if (g_str_equal(request->mechanism, "") == FALSE) {
|
||||
/* count nb client mechanism list */
|
||||
client_mech_list = g_strsplit(request->mechanism, " ", 0);
|
||||
cmech = client_mech_list;
|
||||
while (*cmech != NULL) {
|
||||
cmech++;
|
||||
nbmech++;
|
||||
}
|
||||
|
||||
mechanisms = lasso_authentication_get_mechanism_list(authentication);
|
||||
server_mech_list = g_strsplit(mechanisms, " ", 0);
|
||||
smech = server_mech_list;
|
||||
|
||||
/* get chosen mechanism */
|
||||
while (*smech != NULL) {
|
||||
cmech = client_mech_list;
|
||||
while (*cmech != NULL) {
|
||||
if ( g_str_equal(*smech, *cmech) == TRUE) {
|
||||
chosen = g_strdup(*smech);
|
||||
break;
|
||||
}
|
||||
cmech++;
|
||||
}
|
||||
if (chosen != NULL)
|
||||
break;
|
||||
smech++;
|
||||
}
|
||||
}
|
||||
if (chosen == NULL) {
|
||||
lasso_release(response->Status->code);
|
||||
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_ABORT);
|
||||
return res;
|
||||
}
|
||||
|
||||
if (nbmech > 1 && request->Data != NULL) {
|
||||
lasso_release(response->Status->code);
|
||||
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_ABORT);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* decode Data if not NULL */
|
||||
if (request->Data != NULL && request->Data->data != NULL) {
|
||||
inbase64 = request->Data->data;
|
||||
in = g_malloc(strlen(inbase64));
|
||||
inlen = xmlSecBase64Decode((xmlChar*)inbase64,
|
||||
(xmlChar*)in, strlen(inbase64));
|
||||
}
|
||||
|
||||
/* process sasl request */
|
||||
res = sasl_server_start(authentication->connection,
|
||||
chosen,
|
||||
in,
|
||||
inlen,
|
||||
&out, /* Might not be NULL terminated */
|
||||
&outlen);
|
||||
|
||||
/* set status code in SASLResponse message if not ok */
|
||||
if (res != SASL_OK) {
|
||||
lasso_release(response->Status->code);
|
||||
|
||||
/* continue, set Data in response */
|
||||
if (res == SASL_CONTINUE) {
|
||||
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_CONTINUE);
|
||||
response->serverMechanism = g_strdup(request->mechanism);
|
||||
if (outlen > 0) {
|
||||
outbase64 = xmlSecBase64Encode((xmlChar*)out, outlen, 0);
|
||||
response->Data = g_list_append(response->Data,
|
||||
g_strdup((char*)outbase64));
|
||||
xmlFree(outbase64);
|
||||
}
|
||||
} else {
|
||||
/* abort authentication */
|
||||
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_ABORT);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
gint
|
||||
lasso_authentication_server_step(LassoAuthentication *authentication)
|
||||
{
|
||||
LassoSaSASLRequest *request;
|
||||
LassoSaSASLResponse *response;
|
||||
int res;
|
||||
char *in = NULL;
|
||||
int inlen = 0;
|
||||
const char *out;
|
||||
unsigned int outlen = 0;
|
||||
xmlChar *outbase64, *inbase64;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_AUTHENTICATION(authentication),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
|
||||
/* Liberty part */
|
||||
request = LASSO_SA_SASL_REQUEST(LASSO_WSF_PROFILE(authentication)->request);
|
||||
response = LASSO_SA_SASL_RESPONSE(LASSO_WSF_PROFILE(authentication)->response);
|
||||
|
||||
/* If mechanism is NULL, thene client wants to abort authentication exchange */
|
||||
if (g_str_equal(request->mechanism, "") == TRUE) {
|
||||
lasso_release(response->Status->code);
|
||||
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_ABORT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (request->Data != NULL && request->Data->data != NULL) {
|
||||
inbase64 = request->Data->data;
|
||||
in = g_malloc(strlen((char*)inbase64));
|
||||
inlen = xmlSecBase64Decode(inbase64, (xmlChar*)in, strlen((char*)inbase64));
|
||||
}
|
||||
|
||||
res = sasl_server_step(authentication->connection,
|
||||
in, /* what the client gave */
|
||||
inlen, /* it's length */
|
||||
&out, /* Might not be NULL terminated */
|
||||
&outlen);
|
||||
|
||||
if (res != SASL_OK) {
|
||||
lasso_release(response->Status->code);
|
||||
|
||||
if (res == SASL_CONTINUE) {
|
||||
/* authentication exchange must continue */
|
||||
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_ABORT);
|
||||
|
||||
if (outlen > 0) {
|
||||
outbase64 = xmlSecBase64Encode((xmlChar*)out, outlen, 0);
|
||||
response->Data = g_list_append(response->Data,
|
||||
g_strdup((char*)outbase64));
|
||||
xmlFree(outbase64);
|
||||
}
|
||||
} else {
|
||||
/* authentication failed, abort exchange */
|
||||
response->Status->code = g_strdup(LASSO_SA_STATUS_CODE_ABORT);
|
||||
}
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static LassoNodeClass *parent_class = NULL;
|
||||
|
||||
static xmlNode*
|
||||
get_xmlNode(LassoNode *node, gboolean lasso_dump)
|
||||
{
|
||||
xmlNode *xmlnode;
|
||||
|
||||
xmlnode = parent_class->get_xmlNode(node, lasso_dump);
|
||||
xmlNodeSetName(xmlnode, (xmlChar*)"Authentication");
|
||||
xmlSetProp(xmlnode, (xmlChar*)"AuthenticationDumpVersion", (xmlChar*)"2");
|
||||
|
||||
return xmlnode;
|
||||
}
|
||||
|
||||
static int
|
||||
init_from_xml(LassoNode *node, xmlNode *xmlnode)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
rc = parent_class->init_from_xml(node, xmlnode);
|
||||
if (rc) return rc;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* overrided parent class methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
dispose(GObject *object)
|
||||
{
|
||||
LassoAuthentication *authentication = LASSO_AUTHENTICATION(object);
|
||||
|
||||
sasl_dispose(&authentication->connection);
|
||||
|
||||
if (authentication->private_data->dispose_has_run == TRUE)
|
||||
return;
|
||||
authentication->private_data->dispose_has_run = TRUE;
|
||||
|
||||
G_OBJECT_CLASS(parent_class)->dispose(object);
|
||||
}
|
||||
|
||||
static void
|
||||
finalize(GObject *object)
|
||||
{
|
||||
LassoAuthentication *authentication = LASSO_AUTHENTICATION(object);
|
||||
lasso_release(authentication->private_data);
|
||||
authentication->private_data = NULL;
|
||||
G_OBJECT_CLASS(parent_class)->finalize(object);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
instance_init(LassoAuthentication *authentication)
|
||||
{
|
||||
authentication->private_data = g_new0(LassoAuthenticationPrivate, 1);
|
||||
authentication->private_data->dispose_has_run = FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
class_init(LassoAuthenticationClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
parent_class = g_type_class_peek_parent(klass);
|
||||
|
||||
LASSO_NODE_CLASS(klass)->get_xmlNode = get_xmlNode;
|
||||
LASSO_NODE_CLASS(klass)->init_from_xml = init_from_xml;
|
||||
|
||||
G_OBJECT_CLASS(klass)->dispose = dispose;
|
||||
G_OBJECT_CLASS(klass)->finalize = finalize;
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_authentication_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof(LassoAuthenticationClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoAuthentication),
|
||||
0,
|
||||
(GInstanceInitFunc) instance_init,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_WSF_PROFILE,
|
||||
"LassoAuthentication", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoAuthentication*
|
||||
lasso_authentication_new(LassoServer *server)
|
||||
{
|
||||
LassoAuthentication *authentication = NULL;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_SERVER(server), NULL);
|
||||
|
||||
authentication = g_object_new(LASSO_TYPE_AUTHENTICATION, NULL);
|
||||
LASSO_WSF_PROFILE(authentication)->server = server;
|
||||
|
||||
return authentication;
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_AUTHENTICATION_H__
|
||||
#define __LASSO_AUTHENTICATION_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <sasl/sasl.h>
|
||||
|
||||
#include "wsf_profile.h"
|
||||
#include "../xml/disco_description.h"
|
||||
|
||||
#define LASSO_TYPE_AUTHENTICATION (lasso_authentication_get_type())
|
||||
#define LASSO_AUTHENTICATION(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_AUTHENTICATION, LassoAuthentication))
|
||||
#define LASSO_AUTHENTICATION_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_AUTHENTICATION, LassoAuthenticationClass))
|
||||
#define LASSO_IS_AUTHENTICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_AUTHENTICATION))
|
||||
#define LASSO_IS_AUTHENTICATION_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_AUTHENTICATION))
|
||||
#define LASSO_AUTHENTICATION_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_AUTHENTICATION, LassoAuthenticationClass))
|
||||
|
||||
typedef struct _LassoAuthentication LassoAuthentication;
|
||||
typedef struct _LassoAuthenticationClass LassoAuthenticationClass;
|
||||
typedef struct _LassoAuthenticationPrivate LassoAuthenticationPrivate;
|
||||
|
||||
typedef struct LassoUserAccount LassoUserAccount;
|
||||
|
||||
typedef enum {
|
||||
LASSO_SASL_MECH_ANONYMOUS = 1,
|
||||
LASSO_SASL_MECH_PLAIN,
|
||||
LASSO_SASL_MECH_CRAM_MD5,
|
||||
}LassoSaslMechanisms;
|
||||
|
||||
struct LassoUserAccount {
|
||||
char *login;
|
||||
char *password;
|
||||
};
|
||||
|
||||
struct _LassoAuthentication {
|
||||
LassoWsfProfile parent;
|
||||
|
||||
/* The SASL context kept for the life of the connection */
|
||||
sasl_conn_t *connection;
|
||||
sasl_interact_t **client_interact;
|
||||
|
||||
/*< private >*/
|
||||
LassoAuthenticationPrivate *private_data;
|
||||
};
|
||||
|
||||
struct _LassoAuthenticationClass {
|
||||
LassoWsfProfileClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_authentication_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoAuthentication* lasso_authentication_new(LassoServer *server);
|
||||
|
||||
LASSO_EXPORT void lasso_authentication_destroy(LassoAuthentication *authentication);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_authentication_client_start(LassoAuthentication *authentication);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_authentication_client_step(LassoAuthentication *authentication);
|
||||
|
||||
LASSO_EXPORT char *lasso_authentication_get_mechanism_list(LassoAuthentication *authentication);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_authentication_init_request(LassoAuthentication *authentication,
|
||||
LassoDiscoDescription *description,
|
||||
const gchar *mechanisms,
|
||||
LassoUserAccount *account);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_authentication_process_request_msg(LassoAuthentication *authentication,
|
||||
const gchar *soap_msg);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_authentication_process_response_msg(LassoAuthentication *authentication,
|
||||
const gchar *soap_msg);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_authentication_server_start(LassoAuthentication *authentication);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_authentication_server_step(LassoAuthentication *authentication);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_AUTHENTICATION_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,130 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DATA_SERVICE_H__
|
||||
#define __LASSO_DATA_SERVICE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "wsf_profile.h"
|
||||
#include "../xml/disco_resource_id.h"
|
||||
#include "../xml/disco_encrypted_resource_id.h"
|
||||
#include "../xml/dst_data.h"
|
||||
#include "../xml/dst_modification.h"
|
||||
#include "../xml/dst_query_item.h"
|
||||
#include "../xml/disco_resource_offering.h"
|
||||
#include "../xml/xml.h"
|
||||
#include "../xml/saml_assertion.h"
|
||||
|
||||
#define LASSO_TYPE_DATA_SERVICE (lasso_data_service_get_type())
|
||||
#define LASSO_DATA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DATA_SERVICE, LassoDataService))
|
||||
#define LASSO_DATA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_DATA_SERVICE, LassoDataServiceClass))
|
||||
#define LASSO_IS_DATA_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
LASSO_TYPE_DATA_SERVICE))
|
||||
#define LASSO_IS_DATA_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||
LASSO_TYPE_DATA_SERVICE))
|
||||
#define LASSO_DATA_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_DATA_SERVICE, LassoDataServiceClass))
|
||||
|
||||
typedef struct _LassoDataService LassoDataService;
|
||||
typedef struct _LassoDataServiceClass LassoDataServiceClass;
|
||||
typedef struct _LassoDataServicePrivate LassoDataServicePrivate;
|
||||
|
||||
struct _LassoDataService {
|
||||
LassoWsfProfile parent;
|
||||
|
||||
/*< private >*/
|
||||
LassoDataServicePrivate *private_data;
|
||||
};
|
||||
|
||||
struct _LassoDataServiceClass {
|
||||
LassoWsfProfileClass parent;
|
||||
};
|
||||
|
||||
|
||||
LASSO_EXPORT GType lasso_data_service_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDataService* lasso_data_service_new(LassoServer *server);
|
||||
|
||||
LASSO_EXPORT LassoDataService* lasso_data_service_new_full(LassoServer *server,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_init_query(LassoDataService *service,
|
||||
const char *select, const char *item_id, const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_add_query_item(LassoDataService *service,
|
||||
const char *select, const char *item_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_process_request_msg(LassoDataService *service,
|
||||
const char *message, const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_validate_request(LassoDataService *service);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_build_query_response_msg(LassoDataService *service);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_build_modify_response_msg(LassoDataService *service);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_build_response_msg(LassoDataService *service);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_process_query_response_msg(LassoDataService *service,
|
||||
const char *message);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_get_answer(LassoDataService *service,
|
||||
xmlNode **output);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_get_answers(LassoDataService *service, GList **output);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_get_answers_by_select(LassoDataService *service,
|
||||
const char *select, GList **output);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_get_answers_by_item_id(LassoDataService *service,
|
||||
const char *item_id, GList **output);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_init_modify(LassoDataService *service,
|
||||
const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_add_modification(LassoDataService *service,
|
||||
const gchar *select, xmlNode *xmlData, gboolean overrideAllowed,
|
||||
time_t *notChangedSince, LassoDstModification **output);
|
||||
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_process_modify_response_msg(LassoDataService *service,
|
||||
const gchar *soap_msg);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_data_service_get_query_item(LassoDataService *service, const char *select,
|
||||
const char *item_id, LassoDstQueryItem **output);
|
||||
|
||||
LASSO_EXPORT void lasso_data_service_set_resource_data(LassoDataService *service, const xmlNode *resource_data);
|
||||
|
||||
LASSO_EXPORT xmlNode *lasso_data_service_get_resource_data(LassoDataService *service);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DATA_SERVICE_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,123 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCOVERY_H__
|
||||
#define __LASSO_DISCOVERY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../xml/disco_insert_entry.h"
|
||||
#include "../xml/disco_modify.h"
|
||||
#include "../xml/disco_modify_response.h"
|
||||
#include "../xml/disco_query.h"
|
||||
#include "../xml/disco_query_response.h"
|
||||
#include "../xml/disco_remove_entry.h"
|
||||
#include "../xml/disco_requested_service_type.h"
|
||||
|
||||
#include "wsf_profile.h"
|
||||
#include "data_service.h"
|
||||
|
||||
#define LASSO_TYPE_DISCOVERY (lasso_discovery_get_type())
|
||||
#define LASSO_DISCOVERY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_DISCOVERY, LassoDiscovery))
|
||||
#define LASSO_DISCOVERY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_DISCOVERY, LassoDiscoveryClass))
|
||||
#define LASSO_IS_DISCOVERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCOVERY))
|
||||
#define LASSO_IS_DISCOVERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_DISCOVERY))
|
||||
#define LASSO_DISCOVERY_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DISCOVERY, LassoDiscoveryClass))
|
||||
|
||||
typedef struct _LassoDiscovery LassoDiscovery;
|
||||
typedef struct _LassoDiscoveryClass LassoDiscoveryClass;
|
||||
typedef struct _LassoDiscoveryPrivate LassoDiscoveryPrivate;
|
||||
|
||||
|
||||
struct _LassoDiscovery {
|
||||
LassoWsfProfile parent;
|
||||
|
||||
/*< public >*/
|
||||
LassoDiscoResourceID *ResourceID;
|
||||
LassoDiscoEncryptedResourceID *EncryptedResourceID;
|
||||
|
||||
/*< private >*/
|
||||
LassoDiscoveryPrivate *private_data;
|
||||
};
|
||||
|
||||
struct _LassoDiscoveryClass {
|
||||
LassoWsfProfileClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_discovery_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDiscovery* lasso_discovery_new(LassoServer *server);
|
||||
|
||||
LASSO_EXPORT LassoDiscovery* lasso_discovery_new_full(LassoServer *server,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_init_modify(LassoDiscovery *discovery,
|
||||
const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_add_insert_entry(LassoDiscovery *discovery,
|
||||
LassoDiscoServiceInstance *serviceInstance, LassoDiscoResourceID *resourceId);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_add_remove_entry(LassoDiscovery *discovery,
|
||||
const gchar *entryID);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_init_query(LassoDiscovery *discovery,
|
||||
const gchar *security_mech_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_add_requested_service_type(
|
||||
LassoDiscovery *discovery, const gchar *service_type, const gchar *option);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_process_request_msg(LassoDiscovery *discovery,
|
||||
const gchar *message, const gchar *security_mech_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_build_response_msg(LassoDiscovery *discovery);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_process_modify_response_msg(LassoDiscovery *discovery,
|
||||
const gchar *message);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_discovery_process_query_response_msg(LassoDiscovery *discovery,
|
||||
const gchar *message);
|
||||
|
||||
LASSO_EXPORT LassoWsfProfile* lasso_discovery_get_service(LassoDiscovery *discovery,
|
||||
const char *service_type);
|
||||
|
||||
LASSO_EXPORT GList* lasso_discovery_get_services(LassoDiscovery *discovery);
|
||||
|
||||
typedef LassoWsfProfile *(*LassoWsfProfileConstructor)(LassoServer *server,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
|
||||
LASSO_EXPORT void lasso_discovery_register_constructor_for_service_type(gchar const *service_type,
|
||||
LassoWsfProfileConstructor constructor);
|
||||
LASSO_EXPORT void lasso_discovery_unregister_constructor_for_service_type(gchar const *service_type,
|
||||
LassoWsfProfileConstructor constructor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCOVERY_H__ */
|
|
@ -1,381 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
*
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "id_ff_extensions.h"
|
||||
#include "../xml/idwsf_strings.h"
|
||||
#include "id_ff_extensions_private.h"
|
||||
#include "../xml/disco_description.h"
|
||||
#include "../xml/disco_resource_offering.h"
|
||||
#include "../xml/disco_service_instance.h"
|
||||
#include "../xml/id-wsf-2.0/disco_service_context.h"
|
||||
#include "../id-ff/profile.h"
|
||||
#include "../id-ff/server.h"
|
||||
#include "../id-ff/loginprivate.h"
|
||||
#include "../id-ff/serverprivate.h"
|
||||
#include "../id-ff/identityprivate.h"
|
||||
#include "../xml/saml_attribute.h"
|
||||
#include "../xml/saml_attribute_value.h"
|
||||
#include "../xml/saml_attribute_statement.h"
|
||||
#include "../id-wsf-2.0/server.h"
|
||||
|
||||
/**
|
||||
* SECTION:id-ff-extensions
|
||||
*
|
||||
* Those functions are called from ID-FF part of lasso when ID-WSF support is enabled. They enable
|
||||
* the boot-straping of the ID-WSF services, notably the access to the Discovery service (see
|
||||
* #LassoDiscovery).
|
||||
*/
|
||||
|
||||
/**
|
||||
* lasso_login_assertion_add_discovery:
|
||||
* @login: a #LassoLogin object
|
||||
* @assertion: a #LassoSamlAssertion object
|
||||
*
|
||||
* Adds AttributeStatement and ResourceOffering attributes to @assertion of a @login object if there
|
||||
* is a discovery service registerered in the @LassoLogin.server field.
|
||||
* .
|
||||
**/
|
||||
void
|
||||
lasso_login_assertion_add_discovery(LassoLogin *login, LassoSamlAssertion *assertion)
|
||||
{
|
||||
LassoProfile *profile = LASSO_PROFILE(login);
|
||||
LassoDiscoResourceOffering *resourceOffering;
|
||||
LassoDiscoServiceInstance *serviceInstance, *newServiceInstance;
|
||||
LassoSamlAttributeStatement *attributeStatement;
|
||||
LassoSamlAttribute *attribute;
|
||||
LassoSamlAttributeValue *attributeValue;
|
||||
|
||||
serviceInstance = lasso_server_get_service(profile->server, LASSO_DISCO_HREF);
|
||||
if (LASSO_IS_DISCO_SERVICE_INSTANCE(serviceInstance) &&
|
||||
login->private_data->resourceId) {
|
||||
newServiceInstance = lasso_disco_service_instance_copy(serviceInstance);
|
||||
|
||||
resourceOffering = lasso_disco_resource_offering_new(newServiceInstance);
|
||||
lasso_release_gobject(newServiceInstance);
|
||||
lasso_assign_gobject(resourceOffering->ResourceID, login->private_data->resourceId);
|
||||
|
||||
attributeValue = lasso_saml_attribute_value_new();
|
||||
lasso_list_add_new_gobject(attributeValue->any, resourceOffering);
|
||||
|
||||
attribute = lasso_saml_attribute_new();
|
||||
lasso_assign_string(attribute->attributeName, "DiscoveryResourceOffering");
|
||||
lasso_assign_string(attribute->attributeNameSpace, LASSO_DISCO_HREF);
|
||||
lasso_list_add_new_gobject(attribute->AttributeValue, attributeValue);
|
||||
|
||||
attributeStatement = lasso_saml_attribute_statement_new();
|
||||
lasso_list_add_new_gobject(attributeStatement->Attribute, attribute);
|
||||
|
||||
lasso_assign_new_gobject(assertion->AttributeStatement, attributeStatement);
|
||||
|
||||
/* FIXME: Add CredentialsRef and saml:Advice Assertions */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_login_set_encryptedResourceId:
|
||||
* @login: a #LassoLogin object
|
||||
* @encryptedResourceId: the #LassoDiscoEncryptedResourceID to setup in the login object
|
||||
*
|
||||
* Set the #LassoDiscoEncryptedResourceID to place the next produced assertions as an ID-WSF 1.0
|
||||
* bootstrap.
|
||||
*
|
||||
* Return value: 0 on success; or a negative value otherwise.
|
||||
**/
|
||||
int
|
||||
lasso_login_set_encryptedResourceId(LassoLogin *login,
|
||||
LassoDiscoEncryptedResourceID *encryptedResourceId)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(LASSO_IS_DISCO_ENCRYPTED_RESOURCE_ID(encryptedResourceId),
|
||||
LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
lasso_assign_gobject(login->private_data->encryptedResourceId, encryptedResourceId);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_login_set_resourceId:
|
||||
* @login: a #LassoLogin
|
||||
* @content: a resourceID identifier
|
||||
*
|
||||
* Set the resourceId to place in the next produced assertion for ID-WSF bootstrap.
|
||||
*
|
||||
* Return value: 0 on success; or a negative value otherwise.
|
||||
**/
|
||||
int
|
||||
lasso_login_set_resourceId(LassoLogin *login, const char *content)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_LOGIN(login), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(content != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
lasso_assign_new_gobject(login->private_data->resourceId, lasso_disco_resource_id_new(content));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_server_add_service:
|
||||
* @server: a #LassoServer
|
||||
* @service: a #LassoNode object implementing representing a service endpoint.
|
||||
*
|
||||
* Add a service to the registry of service of this #LassoServer object.
|
||||
*
|
||||
* Return value: 0 on success; a negative value if an error occured.
|
||||
**/
|
||||
gint
|
||||
lasso_server_add_service(LassoServer *server, LassoNode *service)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_SERVER(server), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(service != NULL, LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
|
||||
if (LASSO_IS_DISCO_SERVICE_INSTANCE(service)) {
|
||||
g_hash_table_insert(server->services,
|
||||
g_strdup(LASSO_DISCO_SERVICE_INSTANCE(service)->ServiceType),
|
||||
g_object_ref(service));
|
||||
} else if (LASSO_IS_IDWSF2_DISCO_SVC_METADATA(service)) {
|
||||
return lasso_server_add_svc_metadata(server,
|
||||
LASSO_IDWSF2_DISCO_SVC_METADATA(service));
|
||||
} else {
|
||||
return LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
add_service_childnode(G_GNUC_UNUSED gchar *key, LassoNode *value, xmlNode *xmlnode)
|
||||
{
|
||||
xmlAddChild(xmlnode, lasso_node_get_xmlNode(LASSO_NODE(value), TRUE));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
lasso_server_dump_id_wsf_services(LassoServer *server, xmlNode *xmlnode)
|
||||
{
|
||||
if (g_hash_table_size(server->services)) {
|
||||
xmlNode *t;
|
||||
t = xmlNewTextChild(xmlnode, NULL, (xmlChar*)"Services", NULL);
|
||||
g_hash_table_foreach(server->services,
|
||||
(GHFunc)add_service_childnode, t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
lasso_server_init_id_wsf_services(LassoServer *server, xmlNode *t) {
|
||||
xmlNode *t2 = t->children;
|
||||
/* Services */
|
||||
if (strcmp((char*)t->name, "Services") == 0) {
|
||||
while (t2) {
|
||||
LassoDiscoServiceInstance *s;
|
||||
if (t2->type != XML_ELEMENT_NODE) {
|
||||
t2 = t2->next;
|
||||
continue;
|
||||
}
|
||||
s = g_object_new(LASSO_TYPE_DISCO_SERVICE_INSTANCE, NULL);
|
||||
LASSO_NODE_GET_CLASS(s)->init_from_xml(LASSO_NODE(s), t2);
|
||||
g_hash_table_insert(server->services, g_strdup(s->ServiceType), s);
|
||||
t2 = t2->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_identity_add_resource_offering:
|
||||
* @identity: a #LassoIdentity object
|
||||
* @offering: a #LassoDiscoResourceOffering object to add
|
||||
*
|
||||
* Add a new offering to the identity object to be retrieved later by
|
||||
* lasso_identity_get_offerings() or lasso_identity_get_resource_offering().
|
||||
* It also allocate an entryId identifier for the offering, look into
|
||||
* offering->entryID to get it after this call.
|
||||
*
|
||||
* Return value: Always 0, there should not be any error (if memory is not exhausted).
|
||||
*/
|
||||
gint
|
||||
lasso_identity_add_resource_offering(LassoIdentity *identity,
|
||||
LassoDiscoResourceOffering *offering)
|
||||
{
|
||||
char entry_id_s[20];
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
g_return_val_if_fail(LASSO_IS_DISCO_RESOURCE_OFFERING(offering),
|
||||
LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
|
||||
do {
|
||||
g_snprintf(entry_id_s, 18, "%d", identity->private_data->last_entry_id);
|
||||
identity->private_data->last_entry_id++;
|
||||
} while (g_hash_table_lookup(identity->private_data->resource_offerings_map, entry_id_s));
|
||||
lasso_assign_string(offering->entryID, entry_id_s);
|
||||
g_hash_table_insert(identity->private_data->resource_offerings_map,
|
||||
g_strdup(offering->entryID), g_object_ref(offering));
|
||||
identity->is_dirty = TRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_identity_remove_resource_offering:
|
||||
* @identity: a #LassoIdentity
|
||||
* @entryID: the resource offering entry ID
|
||||
*
|
||||
* Remove resource offering about identity with @entryID
|
||||
*
|
||||
* Return value: TRUE on success; FALSE if the offering was not found.
|
||||
**/
|
||||
gboolean
|
||||
lasso_identity_remove_resource_offering(LassoIdentity *identity, const char *entryID)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), FALSE);
|
||||
g_return_val_if_fail(entryID != NULL, LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
|
||||
|
||||
if (g_hash_table_remove(identity->private_data->resource_offerings_map, entryID)) {
|
||||
identity->is_dirty = TRUE;
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Context type for the callback add_matching_resource_offering_to_list */
|
||||
struct HelperStruct {
|
||||
GList *list;
|
||||
const char *service_type;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Helper function for lasso_identity_get_offerings, match them with a service
|
||||
* type string */
|
||||
static
|
||||
void add_matching_resource_offering_to_list(G_GNUC_UNUSED char *name, LassoDiscoResourceOffering *offering,
|
||||
struct HelperStruct *ctx)
|
||||
{
|
||||
if (ctx->service_type == NULL ||
|
||||
( offering->ServiceInstance != NULL &&
|
||||
offering->ServiceInstance->ServiceType != NULL &&
|
||||
strcmp(offering->ServiceInstance->ServiceType, ctx->service_type) == 0)) {
|
||||
lasso_list_add_gobject(ctx->list, offering);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_identity_get_offerings:
|
||||
* @identity: a #LassoIdentity
|
||||
* @service_type: a char* string representing the type of service we are looking for
|
||||
*
|
||||
* Returns a list of #LassoDiscoResourceOffering associated to this service type.
|
||||
*
|
||||
* Return value:(transfer full)(element-type LassoDiscoResourceOffering): a newly allocated list of #LassoDiscoResourceOffering
|
||||
*/
|
||||
GList*
|
||||
lasso_identity_get_offerings(LassoIdentity *identity, const char *service_type)
|
||||
{
|
||||
struct HelperStruct ctx = { NULL, service_type };
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), NULL);
|
||||
|
||||
g_hash_table_foreach(identity->private_data->resource_offerings_map,
|
||||
(GHFunc)add_matching_resource_offering_to_list, &ctx);
|
||||
|
||||
return ctx.list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_identity_resource_offering:
|
||||
* @identity: a #LassoIdentity
|
||||
* @entryID: the entryID of the researched #LassoDiscoResourceOffering
|
||||
*
|
||||
* Lookup a #LassoDiscoResourceOffering corresponding to entryID, entryID is
|
||||
* usually allocated by lasso_identity_add_resource_offering() inside
|
||||
* offering->entryID.
|
||||
*
|
||||
* Return value:(transfer none)(allow-none): a #LassoDiscoResourceOffering, your must ref it if you intend
|
||||
* to keep it around.
|
||||
*/
|
||||
LassoDiscoResourceOffering*
|
||||
lasso_identity_get_resource_offering(LassoIdentity *identity, const char *entryID)
|
||||
{
|
||||
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), NULL);
|
||||
g_return_val_if_fail(entryID != NULL, NULL);
|
||||
|
||||
return g_hash_table_lookup(identity->private_data->resource_offerings_map, entryID);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_server_add_service_from_dump:
|
||||
* @server: a #LassoServer
|
||||
* @dump: the XML dump of a #LassoNode representing a service endpoint.
|
||||
*
|
||||
* An utility function that parse a #LassoNode dump an try to add it as a
|
||||
* service using lasso_server_add_service.
|
||||
*
|
||||
* Return value: 0 if succesfull, LASSO_PARAM_ERROR_BAD_TYPE_OF_NULL_OBJECT if
|
||||
* said dump is not a #LassoNode or is not of the righ type,
|
||||
* LASSO_PARAM_ERROR_INVALID_VALUE if dump is NULL.
|
||||
**/
|
||||
gint
|
||||
lasso_server_add_service_from_dump(LassoServer *server, const gchar *dump)
|
||||
{
|
||||
LassoNode *node;
|
||||
gint return_code;
|
||||
|
||||
g_return_val_if_fail(dump != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
|
||||
|
||||
node = lasso_node_new_from_dump(dump);
|
||||
|
||||
return_code = lasso_server_add_service(server, node);
|
||||
|
||||
g_object_unref(node);
|
||||
|
||||
return return_code;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* lasso_server_get_service:
|
||||
* @server: a #LassoServer
|
||||
* @serviceType: the service type
|
||||
*
|
||||
* Look up a disco service instance corresponding to this service type.
|
||||
*
|
||||
* Return value:(transfer none)(allow-none): the #LassoDiscoServiceInstance, NULL if it was not found.
|
||||
* The #LassoDiscoServiceInstance is owned by Lasso and should not be
|
||||
* freed.
|
||||
**/
|
||||
LassoDiscoServiceInstance*
|
||||
lasso_server_get_service(LassoServer *server, const gchar *serviceType)
|
||||
{
|
||||
return g_hash_table_lookup(server->services, serviceType);
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_WSF_ID_FF_EXTENSIONS_H__
|
||||
#define __LASSO_WSF_ID_FF_EXTENSIONS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/login.h"
|
||||
#include "../id-ff/server.h"
|
||||
#include "../xml/disco_encrypted_resource_id.h"
|
||||
#include "../xml/disco_service_instance.h"
|
||||
#include "../xml/disco_resource_offering.h"
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_login_set_encryptedResourceId(
|
||||
LassoLogin *login, LassoDiscoEncryptedResourceID *encryptedResourceId);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_login_set_resourceId(LassoLogin *login, const char *content);
|
||||
|
||||
LASSO_EXPORT LassoDiscoServiceInstance* lasso_server_get_service(LassoServer *server,
|
||||
const gchar *serviceType);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_server_add_service(LassoServer *server, LassoNode *service);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_server_add_service_from_dump(LassoServer *server, const gchar *dump);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_identity_add_resource_offering(LassoIdentity *identity,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
LASSO_EXPORT gboolean lasso_identity_remove_resource_offering(LassoIdentity *identity,
|
||||
const char *entryID);
|
||||
LASSO_EXPORT GList* lasso_identity_get_offerings(LassoIdentity *identity,
|
||||
const char *service_type);
|
||||
LASSO_EXPORT LassoDiscoResourceOffering* lasso_identity_get_resource_offering(
|
||||
LassoIdentity *identity, const char *entryID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_WSF_ID_FF_EXTENSIONS_H__ */
|
|
@ -1,46 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_WSF_ID_FF_EXTENSIONS_H__
|
||||
#define __LASSO_WSF_ID_FF_EXTENSIONS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/login.h"
|
||||
#include "../xml/saml_assertion.h"
|
||||
|
||||
void lasso_login_assertion_add_discovery(LassoLogin *login, LassoSamlAssertion *assertion);
|
||||
|
||||
void lasso_server_dump_id_wsf_services(LassoServer *server, xmlNode *xmlnode);
|
||||
|
||||
void lasso_server_init_id_wsf_services(LassoServer *server, xmlNode *t);
|
||||
|
||||
gint lasso_server_add_service(LassoServer *server, LassoNode *service);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_WSF_ID_FF_EXTENSIONS_H__ */
|
|
@ -1,37 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDSWF_H__
|
||||
#define __LASSO_IDSWF_H__
|
||||
|
||||
#include "authentication.h"
|
||||
#include "data_service.h"
|
||||
#include "discovery.h"
|
||||
#include "id_ff_extensions.h"
|
||||
#include "id_wsf.h"
|
||||
#include "interaction_profile_service.h"
|
||||
#include "personal_profile_service.h"
|
||||
#include "wsf_utils.h"
|
||||
#include "wsf_profile.h"
|
||||
|
||||
#endif /* __LASSO_IDSWF_H__ */
|
|
@ -1,172 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "interaction_profile_service.h"
|
||||
#include "../xml/idwsf_strings.h"
|
||||
#include "wsf_profile.h"
|
||||
#include "../xml/soap-1.1/soap_detail.h"
|
||||
#include "../xml/soap-1.1/soap_fault.h"
|
||||
#include "../xml/is_redirect_request.h"
|
||||
#include "../utils.h"
|
||||
|
||||
/**
|
||||
* SECTION:interaction_profile_service
|
||||
* @short_description: A service to request user interaction from a principal
|
||||
* @stability: Unstable
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
struct _LassoInteractionProfileServicePrivate
|
||||
{
|
||||
gboolean dispose_has_run;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* public methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
gint
|
||||
lasso_interaction_profile_service_init_request(LassoInteractionProfileService *service)
|
||||
{
|
||||
LassoWsfProfile *profile;
|
||||
LassoIsInteractionRequest *request;
|
||||
|
||||
profile = LASSO_WSF_PROFILE(service);
|
||||
|
||||
request = lasso_is_interaction_request_new();
|
||||
|
||||
profile->request = LASSO_NODE(request);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
gint
|
||||
lasso_interaction_profile_service_process_request_msg(LassoInteractionProfileService *service,
|
||||
const gchar *msg)
|
||||
{
|
||||
LassoIsInteractionRequest *request;
|
||||
|
||||
request = lasso_is_interaction_request_new();
|
||||
lasso_node_init_from_message((LassoNode*)request, msg);
|
||||
LASSO_WSF_PROFILE(service)->request = LASSO_NODE(request);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
gint
|
||||
lasso_interaction_profile_service_process_response_msg(LassoInteractionProfileService *service,
|
||||
const gchar *msg)
|
||||
{
|
||||
LassoIsInteractionResponse *response;
|
||||
|
||||
response = lasso_is_interaction_response_new();
|
||||
lasso_node_init_from_message((LassoNode*)response, msg);
|
||||
LASSO_WSF_PROFILE(service)->response = LASSO_NODE(response);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_interaction_profile_service_build_redirect_response_msg:
|
||||
* @profile: a #LassoWsfProfile
|
||||
* @redirect_url: an #xmlChar string containing an HTTP url for interaction with the user
|
||||
*
|
||||
* The redirect_url must contain a way for the interaction service to link this interaction with the
|
||||
* current request, usually it is the xml:id of the original request.
|
||||
*
|
||||
* Return value: 0 if successful, an error code otherwise.
|
||||
*/
|
||||
gint
|
||||
lasso_wsf_profile_init_interaction_service_redirect(LassoWsfProfile *profile, char *redirect_url)
|
||||
{
|
||||
LassoSoapDetail *detail = NULL;
|
||||
LassoSoapFault *fault = NULL;
|
||||
|
||||
lasso_bad_param(WSF_PROFILE, profile);
|
||||
|
||||
detail = lasso_soap_detail_new();
|
||||
fault = lasso_soap_fault_new();
|
||||
lasso_assign_new_gobject(fault->Detail, detail);
|
||||
lasso_assign_string(fault->faultcode, LASSO_SOAP_FAULT_CODE_SERVER);
|
||||
lasso_list_add_new_gobject(detail->any, lasso_is_redirect_request_new(redirect_url));
|
||||
|
||||
return lasso_wsf_profile_init_soap_response(profile, &fault->parent);
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static LassoInteractionProfileServiceClass *parent_class = NULL;
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoInteractionProfileServiceClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
parent_class = g_type_class_peek_parent(klass);
|
||||
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_interaction_profile_service_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof(LassoInteractionProfileServiceClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoInteractionProfileService),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_WSF_PROFILE,
|
||||
"LassoInteractionProfileService", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoInteractionProfileService*
|
||||
lasso_interaction_profile_service_new(LassoServer *server)
|
||||
{
|
||||
LassoInteractionProfileService *service = NULL;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_SERVER(server), NULL);
|
||||
|
||||
service = g_object_new(LASSO_TYPE_INTERACTION_PROFILE_SERVICE, NULL);
|
||||
|
||||
return service;
|
||||
}
|
|
@ -1,86 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_INTERACTION_PROFILE_SERVICE_H__
|
||||
#define __LASSO_INTERACTION_PROFILE_SERVICE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../xml/is_interaction_request.h"
|
||||
#include "../xml/is_interaction_response.h"
|
||||
#include "wsf_profile.h"
|
||||
|
||||
#define LASSO_TYPE_INTERACTION_PROFILE_SERVICE (lasso_interaction_profile_service_get_type())
|
||||
#define LASSO_INTERACTION_PROFILE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_INTERACTION_PROFILE_SERVICE, LassoInteractionProfileService))
|
||||
#define LASSO_INTERACTION_PROFILE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_INTERACTION_PROFILE_SERVICE, LassoInteractionProfileServiceClass))
|
||||
#define LASSO_IS_INTERACTION_PROFILE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
LASSO_TYPE_INTERACTION_PROFILE_SERVICE))
|
||||
#define LASSO_IS_INTERACTION_PROFILE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||
LASSO_TYPE_INTERACTION_PROFILE_SERVICE))
|
||||
#define LASSO_INTERACTION_PROFILE_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_INTERACTION_PROFILE_SERVICE, LassoInteractionProfileServiceClass))
|
||||
|
||||
typedef struct _LassoInteractionProfileService LassoInteractionProfileService;
|
||||
typedef struct _LassoInteractionProfileServiceClass LassoInteractionProfileServiceClass;
|
||||
typedef struct _LassoInteractionProfileServicePrivate LassoInteractionProfileServicePrivate;
|
||||
|
||||
struct _LassoInteractionProfileService {
|
||||
LassoWsfProfile parent;
|
||||
|
||||
};
|
||||
|
||||
struct _LassoInteractionProfileServiceClass {
|
||||
LassoWsfProfileClass parent;
|
||||
};
|
||||
|
||||
|
||||
LASSO_EXPORT GType lasso_interaction_profile_service_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoInteractionProfileService* lasso_interaction_profile_service_new(
|
||||
LassoServer *server);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_interaction_profile_service_init_request(
|
||||
LassoInteractionProfileService *service);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_interaction_profile_service_process_request_msg(
|
||||
LassoInteractionProfileService *service,
|
||||
const gchar *request_msg);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_interaction_profile_service_process_response_msg(
|
||||
LassoInteractionProfileService *service,
|
||||
const gchar *response_msg);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_init_interaction_service_redirect(
|
||||
LassoWsfProfile *profile, char *redirect_url);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_INTERACTION_PROFILE_SERVICE_H__ */
|
|
@ -1,155 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../xml/private.h"
|
||||
#include "personal_profile_service.h"
|
||||
#include "../xml/idwsf_strings.h"
|
||||
#include "data_service.h"
|
||||
#include "wsf_profile_private.h"
|
||||
#include "discovery.h"
|
||||
#include "../utils.h"
|
||||
|
||||
/**
|
||||
* SECTION:personal_profile_service
|
||||
* @short_description: a subclass of LassoDataService to access Personal Profile datas
|
||||
* @stability: Unstable
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* public methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
char*
|
||||
lasso_personal_profile_service_get_email(LassoPersonalProfileService *service)
|
||||
{
|
||||
xmlNode *xmlnode, *child;
|
||||
xmlChar *msgAccount = NULL, *msgProvider = NULL;
|
||||
char *email;
|
||||
GList *answers = NULL, *answer = NULL;
|
||||
gint rc = 0;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_PERSONAL_PROFILE_SERVICE(service) == TRUE, NULL);
|
||||
|
||||
rc = lasso_data_service_get_answers_by_select(LASSO_DATA_SERVICE(service),
|
||||
"/pp:PP/pp:MsgContact", &answers);
|
||||
|
||||
lasso_foreach(answer, answers)
|
||||
{
|
||||
xmlnode = (xmlNode*)answer->data;
|
||||
child = xmlnode->children;
|
||||
while (child != NULL) {
|
||||
if (child->type != XML_ELEMENT_NODE) {
|
||||
child = child->next;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp((char *)child->name, "MsgAccount") == 0) {
|
||||
msgAccount = xmlNodeGetContent(child);
|
||||
} else if (strcmp((char *)child->name, "MsgProvider") == 0) {
|
||||
msgProvider = xmlNodeGetContent(child);
|
||||
}
|
||||
|
||||
if (msgAccount != NULL && msgProvider != NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
child = child->next;
|
||||
}
|
||||
|
||||
if (msgAccount && msgProvider) {
|
||||
email = g_strdup_printf("%s@%s", msgAccount, msgProvider);
|
||||
break;
|
||||
} else {
|
||||
email = NULL;
|
||||
}
|
||||
lasso_release_xml_string(msgAccount);
|
||||
lasso_release_xml_string(msgProvider);
|
||||
lasso_release_xml_node(xmlnode);
|
||||
}
|
||||
|
||||
lasso_release_xml_string(msgAccount);
|
||||
lasso_release_xml_string(msgProvider);
|
||||
lasso_release_xml_node(xmlnode);
|
||||
return email;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
GType
|
||||
lasso_personal_profile_service_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
lasso_discovery_register_constructor_for_service_type(LASSO_PP10_HREF,
|
||||
(LassoWsfProfileConstructor)lasso_personal_profile_service_new_full);
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof(LassoPersonalProfileServiceClass),
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoPersonalProfileService),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_DATA_SERVICE,
|
||||
"LassoPersonalProfileService", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoPersonalProfileService*
|
||||
lasso_personal_profile_service_new(LassoServer *server)
|
||||
{
|
||||
LassoPersonalProfileService *service;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_SERVER(server), NULL);
|
||||
|
||||
service = g_object_new(LASSO_TYPE_PERSONAL_PROFILE_SERVICE, NULL);
|
||||
LASSO_WSF_PROFILE(service)->server = g_object_ref(server);
|
||||
|
||||
return service;
|
||||
}
|
||||
|
||||
LassoPersonalProfileService*
|
||||
lasso_personal_profile_service_new_full(LassoServer *server, LassoDiscoResourceOffering *offering)
|
||||
{
|
||||
LassoPersonalProfileService *service = lasso_personal_profile_service_new(server);
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_DISCO_RESOURCE_OFFERING(offering), NULL);
|
||||
|
||||
if (service == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
lasso_wsf_profile_set_resource_offering(&service->parent.parent, offering);
|
||||
|
||||
return service;
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_PERSONAL_PROFILE_SERVICE_H__
|
||||
#define __LASSO_PERSONAL_PROFILE_SERVICE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "data_service.h"
|
||||
#include "../xml/disco_resource_id.h"
|
||||
#include "../xml/disco_encrypted_resource_id.h"
|
||||
#include "../xml/dst_data.h"
|
||||
#include "../xml/dst_modification.h"
|
||||
#include "../xml/dst_query_item.h"
|
||||
#include "../xml/disco_resource_offering.h"
|
||||
|
||||
#define LASSO_TYPE_PERSONAL_PROFILE_SERVICE (lasso_personal_profile_service_get_type())
|
||||
#define LASSO_PERSONAL_PROFILE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_PERSONAL_PROFILE_SERVICE, LassoPersonalProfileService))
|
||||
#define LASSO_PERSONAL_PROFILE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_PERSONAL_PROFILE_SERVICE, LassoPersonalProfileServiceClass))
|
||||
#define LASSO_IS_PERSONAL_PROFILE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
LASSO_TYPE_PERSONAL_PROFILE_SERVICE))
|
||||
#define LASSO_IS_PERSONAL_PROFILE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||
LASSO_TYPE_PERSONAL_PROFILE_SERVICE))
|
||||
#define LASSO_PERSONAL_PROFILE_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_PERSONAL_PROFILE_SERVICE, LassoPersonalProfileServiceClass))
|
||||
|
||||
typedef struct _LassoPersonalProfileService LassoPersonalProfileService;
|
||||
typedef struct _LassoPersonalProfileServiceClass LassoPersonalProfileServiceClass;
|
||||
typedef struct _LassoPersonalProfileServicePrivate LassoPersonalProfileServicePrivate;
|
||||
|
||||
struct _LassoPersonalProfileService {
|
||||
LassoDataService parent;
|
||||
};
|
||||
|
||||
struct _LassoPersonalProfileServiceClass {
|
||||
LassoDataServiceClass parent;
|
||||
};
|
||||
|
||||
|
||||
LASSO_EXPORT GType lasso_personal_profile_service_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoPersonalProfileService* lasso_personal_profile_service_new(LassoServer *server);
|
||||
|
||||
LASSO_EXPORT LassoPersonalProfileService* lasso_personal_profile_service_new_full(
|
||||
LassoServer *server, LassoDiscoResourceOffering *offering);
|
||||
|
||||
LASSO_EXPORT gchar* lasso_personal_profile_service_get_email(LassoPersonalProfileService *service);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_PERSONAL_PROFILE_SERVICE_H__ */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,186 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_WSF_PROFILE_H__
|
||||
#define __LASSO_WSF_PROFILE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../id-ff/server.h"
|
||||
#include "../id-ff/identity.h"
|
||||
#include "../id-ff/session.h"
|
||||
#include "../xml/soap-1.1/soap_envelope.h"
|
||||
#include "../xml/soap_binding_provider.h"
|
||||
#include "../xml/soap-1.1/soap_fault.h"
|
||||
#include "../xml/saml_assertion.h"
|
||||
#include "../xml/disco_description.h"
|
||||
#include "../xml/disco_resource_offering.h"
|
||||
#include "../xml/disco_description.h"
|
||||
|
||||
#define LASSO_TYPE_WSF_PROFILE (lasso_wsf_profile_get_type())
|
||||
#define LASSO_WSF_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_WSF_PROFILE, LassoWsfProfile))
|
||||
#define LASSO_WSF_PROFILE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_WSF_PROFILE, LassoWsfProfileClass))
|
||||
#define LASSO_IS_WSF_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_WSF_PROFILE))
|
||||
#define LASSO_IS_WSF_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||
LASSO_TYPE_WSF_PROFILE))
|
||||
#define LASSO_WSF_PROFILE_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_WSF_PROFILE, LassoWsfProfileClass))
|
||||
|
||||
typedef struct _LassoWsfProfile LassoWsfProfile;
|
||||
typedef struct _LassoWsfProfileClass LassoWsfProfileClass;
|
||||
typedef struct _LassoWsfProfilePrivate LassoWsfProfilePrivate;
|
||||
|
||||
struct _LassoWsfProfile {
|
||||
LassoNode parent;
|
||||
|
||||
LassoServer *server;
|
||||
|
||||
LassoNode *request;
|
||||
LassoNode *response;
|
||||
|
||||
LassoSoapEnvelope *soap_envelope_request;
|
||||
LassoSoapEnvelope *soap_envelope_response;
|
||||
|
||||
gchar *msg_url;
|
||||
gchar *msg_body;
|
||||
|
||||
/*< private >*/
|
||||
LassoIdentity *identity;
|
||||
LassoSession *session;
|
||||
|
||||
LassoWsfProfilePrivate *private_data;
|
||||
};
|
||||
|
||||
struct _LassoWsfProfileClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_wsf_profile_get_type(void);
|
||||
|
||||
G_GNUC_DEPRECATED LASSO_EXPORT lasso_error_t lasso_wsf_profile_move_credentials(LassoWsfProfile *src,
|
||||
LassoWsfProfile *dest);
|
||||
|
||||
LASSO_EXPORT LassoIdentity* lasso_wsf_profile_get_identity(const LassoWsfProfile *profile);
|
||||
LASSO_EXPORT LassoSession* lasso_wsf_profile_get_session(const LassoWsfProfile *profile);
|
||||
LASSO_EXPORT gboolean lasso_wsf_profile_is_identity_dirty(const LassoWsfProfile *profile);
|
||||
LASSO_EXPORT gboolean lasso_wsf_profile_is_session_dirty(const LassoWsfProfile *profile);
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_set_identity_from_dump(LassoWsfProfile *profile,
|
||||
const gchar *dump);
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_set_session_from_dump(LassoWsfProfile *profile,
|
||||
const gchar *dump);
|
||||
|
||||
G_GNUC_DEPRECATED LASSO_EXPORT LassoSoapEnvelope* lasso_wsf_profile_build_soap_envelope(
|
||||
const char *refToMessageId,
|
||||
const char *providerId);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_build_soap_request_msg(LassoWsfProfile *profile);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_build_soap_response_msg(LassoWsfProfile *profile);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_init_soap_request(LassoWsfProfile *profile, LassoNode *request);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_init_soap_response(LassoWsfProfile *profile,
|
||||
LassoNode *response);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_process_soap_request_msg(LassoWsfProfile *profile,
|
||||
const gchar *message, const gchar *security_mech_id);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_process_soap_response_msg(LassoWsfProfile *profile,
|
||||
const gchar *message);
|
||||
|
||||
G_GNUC_DEPRECATED LASSO_EXPORT LassoSoapBindingProvider* lasso_wsf_profile_set_provider_soap_request(
|
||||
LassoWsfProfile *profile, const char *providerId);
|
||||
|
||||
LASSO_EXPORT LassoWsfProfile* lasso_wsf_profile_new(LassoServer *server);
|
||||
|
||||
LASSO_EXPORT LassoWsfProfile* lasso_wsf_profile_new_full(LassoServer *server,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
|
||||
G_GNUC_DEPRECATED LASSO_EXPORT gboolean lasso_wsf_profile_principal_is_online(
|
||||
LassoWsfProfile *profile);
|
||||
|
||||
G_GNUC_DEPRECATED LASSO_EXPORT lasso_error_t lasso_wsf_profile_add_credential(LassoWsfProfile *profile,
|
||||
xmlNode *credential);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_set_description_from_offering(
|
||||
LassoWsfProfile *profile,
|
||||
const LassoDiscoResourceOffering *offering,
|
||||
const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT void lasso_wsf_profile_set_description(LassoWsfProfile *profile,
|
||||
LassoDiscoDescription *description);
|
||||
|
||||
LASSO_EXPORT LassoDiscoDescription *lasso_wsf_profile_get_description(
|
||||
const LassoWsfProfile *profile);
|
||||
|
||||
LASSO_EXPORT LassoDiscoResourceOffering *lasso_wsf_profile_get_resource_offering(
|
||||
LassoWsfProfile *profile);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_set_security_mech_id(LassoWsfProfile *profile,
|
||||
const char *security_mech_id);
|
||||
|
||||
LASSO_EXPORT const char *lasso_wsf_profile_get_security_mech_id(LassoWsfProfile *profile);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_init(LassoWsfProfile *profile, LassoServer *server,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_get_remote_provider(LassoWsfProfile *wsf_profile,
|
||||
LassoProvider **provider);
|
||||
|
||||
LASSO_EXPORT const char* lasso_wsf_profile_get_remote_provider_id(LassoWsfProfile *wsf_profile);
|
||||
|
||||
LASSO_EXPORT LassoSoapFault* lasso_wsf_profile_get_soap_fault(LassoWsfProfile *wsf_profile);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_set_soap_fault(LassoWsfProfile *wsf_profile, LassoSoapFault *soap_fault);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_set_status_code(LassoWsfProfile *wsf_profile, const char *code);
|
||||
|
||||
LASSO_EXPORT const char* lasso_wsf_profile_get_status_code(LassoWsfProfile *wsf_profile);
|
||||
|
||||
LASSO_EXPORT lasso_error_t lasso_wsf_profile_set_msg_url_from_description(LassoWsfProfile *wsf_profile);
|
||||
|
||||
LASSO_EXPORT void lasso_wsf_profile_set_resource_offering(LassoWsfProfile *profile,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
|
||||
#define lasso_wsf_profile_helper_assign_resource_id(from,to) \
|
||||
if ((from)->ResourceID) {\
|
||||
lasso_assign_gobject((to)->ResourceID, (from)->ResourceID); \
|
||||
} else if ((from)->EncryptedResourceID) {\
|
||||
lasso_assign_gobject((to)->EncryptedResourceID, (from)->EncryptedResourceID); \
|
||||
}
|
||||
|
||||
#define lasso_wsf_profile_helper_set_status(message, code) \
|
||||
{ \
|
||||
lasso_assign_new_gobject(message->Status, lasso_utility_status_new(code)); \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_WSF_PROFILE_H__ */
|
|
@ -1,55 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_WSF_PROFILE_PRIVATE_H__
|
||||
#define __LASSO_WSF_PROFILE_PRIVATE_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "../xml/soap-1.1/soap_fault.h"
|
||||
|
||||
struct _LassoWsfProfilePrivate
|
||||
{
|
||||
gboolean dispose_has_run;
|
||||
char *security_mech_id;
|
||||
LassoDiscoResourceOffering *offering;
|
||||
LassoDiscoDescription *description;
|
||||
char *remote_provider_id;
|
||||
LassoSoapFault *soap_fault;
|
||||
char *status_code;
|
||||
};
|
||||
|
||||
LassoSoapFault* lasso_wsf_profile_get_fault(const LassoWsfProfile *profile);
|
||||
void lasso_wsf_profile_set_resource_offering(LassoWsfProfile *profile,
|
||||
LassoDiscoResourceOffering *offering);
|
||||
gint lasso_wsf_profile_set_msg_url_from_description(LassoWsfProfile *wsf_profile);
|
||||
gint lasso_wsf_profile_build_soap_fault_response_msg(LassoWsfProfile *profile, gint rc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_WSF_PROFILE_PRIVATE_H__ */
|
|
@ -1,152 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:id_wsf_utils
|
||||
* @short_description: Misc functions used in the implementation of ID-WSF 1.0
|
||||
* @stability: Private
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* lasso_security_mech_is_saml_authentication:
|
||||
* @security_mech_id: the URI of an authentication mechanism
|
||||
*
|
||||
* Return value: %TRUE if @security_mech_id is one of
|
||||
* urn:liberty:security:2003-08:null:SAML,
|
||||
* urn:liberty:security:2003-08:TLS:SAML or
|
||||
* urn:liberty:security:2003-08:ClientTLS:SAML, FALSE otherwise.
|
||||
*/
|
||||
|
||||
#include "../xml/private.h"
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../xml/strings.h"
|
||||
#include "../xml/idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* lasso_security_mech_id_is_null_authentication:
|
||||
* @security_mech_id: the URI of an authentication mechanism
|
||||
*
|
||||
* Return value: %TRUE if @security_mech_id is null or one of
|
||||
* urn:liberty:security:2003-08:null:null,
|
||||
* urn:liberty:security:2003-08:TLS:null,
|
||||
* urn:liberty:security:2003-08:ClientTLS:null,
|
||||
* FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
lasso_security_mech_id_is_null_authentication(const char *security_mech_id)
|
||||
{
|
||||
if (security_mech_id == NULL ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_CLIENT_TLS) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_TLS) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_NULL) == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_security_mech_id_is_x509_authentication:
|
||||
* @security_mech_id: the URI of an authentication mechanism
|
||||
*
|
||||
* Return value: %TRUE if @security_mech_id is one of
|
||||
* urn:liberty:security:2003-08:null:X509,
|
||||
* urn:liberty:security:2003-08:TLS:X509,
|
||||
* urn:liberty:security:2003-08:ClientTLS:X509,
|
||||
* FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
lasso_security_mech_id_is_x509_authentication(const char *security_mech_id)
|
||||
{
|
||||
if (!security_mech_id) {
|
||||
return FALSE;
|
||||
}
|
||||
if (strcmp(security_mech_id, LASSO_SECURITY_MECH_CLIENT_TLS_X509) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_TLS_X509) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_X509) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY11_MECH_TLS_X509) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY11_MECH_X509) == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_security_mech_id_is_saml_authentication:
|
||||
* @security_mech_id: the URI of an authentication mechanism
|
||||
*
|
||||
* Return value: %TRUE if @security_mech_id is one of
|
||||
* urn:liberty:security:2003-08:null:SAML,
|
||||
* urn:liberty:security:2003-08:TLS:SAML,
|
||||
* urn:liberty:security:2003-08:ClientTLS:SAML,
|
||||
* urn:liberty:security:2005-02:null:SAML,
|
||||
* urn:liberty:security:2005-02:TLS:SAML,
|
||||
* FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
lasso_security_mech_id_is_saml_authentication(const gchar *security_mech_id)
|
||||
{
|
||||
if (!security_mech_id) {
|
||||
return FALSE;
|
||||
}
|
||||
if (strcmp(security_mech_id, LASSO_SECURITY_MECH_SAML) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_TLS_SAML) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_CLIENT_TLS_SAML) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY11_MECH_SAML) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY11_MECH_TLS_SAML) == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_security_mech_id_is_bearer_authentication:
|
||||
* @security_mech_id: the URI of an authentication mechanism
|
||||
*
|
||||
* Return value: %TRUE if @security_mech_id is one of
|
||||
* urn:liberty:security:2003-08:null:Bearer,
|
||||
* urn:liberty:security:2003-08:TLS:Bearer,
|
||||
* urn:liberty:security:2003-08:ClientTLS:Bearer,
|
||||
* urn:liberty:security:2005-02:null:Bearer,
|
||||
* urn:liberty:security:2005-02:TLS:Bearer,
|
||||
* FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
lasso_security_mech_id_is_bearer_authentication(const gchar *security_mech_id)
|
||||
{
|
||||
if (!security_mech_id) {
|
||||
return FALSE;
|
||||
}
|
||||
if (strcmp(security_mech_id, LASSO_SECURITY_MECH_BEARER) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_TLS_BEARER) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY_MECH_CLIENT_TLS_BEARER) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY11_MECH_BEARER) == 0 ||
|
||||
strcmp(security_mech_id, LASSO_SECURITY11_MECH_TLS_BEARER) == 0) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_IDSWF_UTILS_H__
|
||||
#define __LASSO_IDSWF_UTILS_H__
|
||||
|
||||
LASSO_EXPORT gboolean lasso_security_mech_id_is_null_authentication(const gchar *security_mech_id);
|
||||
LASSO_EXPORT gboolean lasso_security_mech_id_is_x509_authentication(const gchar *security_mech_id);
|
||||
LASSO_EXPORT gboolean lasso_security_mech_id_is_saml_authentication(const gchar *security_mech_id);
|
||||
LASSO_EXPORT gboolean lasso_security_mech_id_is_bearer_authentication(
|
||||
const gchar *security_mech_id);
|
||||
|
||||
#endif
|
|
@ -1,5 +1,3 @@
|
|||
/* lasso/lasso_config.h.in. */
|
||||
|
||||
/* Define if ID-WSF support is enabled */
|
||||
#undef LASSO_WSF_ENABLED
|
||||
#define LASSO_LOG_DOMAIN "Lasso"
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
SUBDIRS = saml-2.0 soap-1.1 dsig ecp
|
||||
if WSF_ENABLED
|
||||
SUBDIRS += id-wsf-2.0 ws
|
||||
endif
|
||||
|
||||
liblassoincludedir = $(includedir)/lasso/xml
|
||||
|
||||
|
@ -14,129 +11,6 @@ AM_CPPFLAGS = \
|
|||
|
||||
noinst_LTLIBRARIES = liblasso-xml.la
|
||||
|
||||
if WSF_ENABLED
|
||||
WSF_C_FILES = \
|
||||
disco_authenticate_requester.c \
|
||||
disco_authenticate_session_context.c \
|
||||
disco_authorize_requester.c \
|
||||
disco_credentials.c \
|
||||
disco_description.c \
|
||||
disco_encrypt_resource_id.c \
|
||||
disco_encrypted_resource_id.c \
|
||||
disco_generate_bearer_token.c \
|
||||
disco_insert_entry.c \
|
||||
disco_modify.c \
|
||||
disco_modify_response.c \
|
||||
disco_options.c \
|
||||
disco_query.c \
|
||||
disco_query_response.c \
|
||||
disco_remove_entry.c \
|
||||
disco_requested_service_type.c \
|
||||
disco_resource_id.c \
|
||||
disco_resource_offering.c \
|
||||
disco_send_single_logout.c \
|
||||
disco_service_instance.c \
|
||||
dst_data.c \
|
||||
dst_modification.c \
|
||||
dst_modify.c \
|
||||
dst_modify_response.c \
|
||||
dst_new_data.c \
|
||||
dst_query.c \
|
||||
dst_query_item.c \
|
||||
dst_query_response.c \
|
||||
is_help.c \
|
||||
is_inquiry.c \
|
||||
is_inquiry_element.c \
|
||||
is_interaction_request.c \
|
||||
is_interaction_response.c \
|
||||
is_interaction_statement.c \
|
||||
is_item.c \
|
||||
is_parameter.c \
|
||||
is_redirect_request.c \
|
||||
is_select.c \
|
||||
is_text.c \
|
||||
is_user_interaction.c \
|
||||
sa_credentials.c \
|
||||
sa_parameter.c \
|
||||
sa_password_transforms.c \
|
||||
sa_transform.c \
|
||||
sa_sasl_request.c \
|
||||
sa_sasl_response.c \
|
||||
sec_resource_access_statement.c \
|
||||
soap_binding_consent.c \
|
||||
soap_binding_correlation.c \
|
||||
soap_binding_processing_context.c \
|
||||
soap_binding_provider.c \
|
||||
soap_binding_usage_directive.c \
|
||||
soap_binding_ext_credential.c \
|
||||
soap_binding_ext_credentials_context.c \
|
||||
soap_binding_ext_service_instance_update.c \
|
||||
soap_binding_ext_timeout.c \
|
||||
soap_binding.c \
|
||||
utility_status.c
|
||||
|
||||
WSF_H_FILES = \
|
||||
idwsf_strings.h \
|
||||
disco_authenticate_requester.h \
|
||||
disco_authenticate_session_context.h \
|
||||
disco_authorize_requester.h \
|
||||
disco_credentials.h \
|
||||
disco_description.h \
|
||||
disco_encrypt_resource_id.h \
|
||||
disco_encrypted_resource_id.h \
|
||||
disco_generate_bearer_token.h \
|
||||
disco_insert_entry.h \
|
||||
disco_modify.h \
|
||||
disco_modify_response.h \
|
||||
disco_options.h \
|
||||
disco_query.h \
|
||||
disco_query_response.h \
|
||||
disco_remove_entry.h \
|
||||
disco_requested_service_type.h \
|
||||
disco_resource_id.h \
|
||||
disco_resource_offering.h \
|
||||
disco_send_single_logout.h \
|
||||
disco_service_instance.h \
|
||||
dst_data.h \
|
||||
dst_modification.h \
|
||||
dst_modify.h \
|
||||
dst_modify_response.h \
|
||||
dst_new_data.h \
|
||||
dst_query.h \
|
||||
dst_query_item.h \
|
||||
dst_query_response.h \
|
||||
is_help.h \
|
||||
is_inquiry.h \
|
||||
is_inquiry_element.h \
|
||||
is_interaction_request.h \
|
||||
is_interaction_response.h \
|
||||
is_interaction_statement.h \
|
||||
is_item.h \
|
||||
is_parameter.h \
|
||||
is_redirect_request.h \
|
||||
is_select.h \
|
||||
is_text.h \
|
||||
is_user_interaction.h \
|
||||
sa_credentials.h \
|
||||
sa_parameter.h \
|
||||
sa_password_transforms.h \
|
||||
sa_transform.h \
|
||||
sa_sasl_request.h \
|
||||
sa_sasl_response.h \
|
||||
sec_resource_access_statement.h \
|
||||
soap_binding_consent.h \
|
||||
soap_binding_correlation.h \
|
||||
soap_binding_processing_context.h \
|
||||
soap_binding_provider.h \
|
||||
soap_binding_usage_directive.h \
|
||||
soap_binding_ext_credential.h \
|
||||
soap_binding_ext_credentials_context.h \
|
||||
soap_binding_ext_service_instance_update.h \
|
||||
soap_binding_ext_timeout.h \
|
||||
soap_binding.h \
|
||||
utility_status.h
|
||||
endif
|
||||
|
||||
liblasso_xml_la_SOURCES = \
|
||||
tools.c \
|
||||
xml.c \
|
||||
|
@ -187,8 +61,7 @@ liblasso_xml_la_SOURCES = \
|
|||
samlp_response.c \
|
||||
samlp_response_abstract.c \
|
||||
samlp_status.c \
|
||||
samlp_status_code.c \
|
||||
$(WSF_C_FILES)
|
||||
samlp_status_code.c
|
||||
|
||||
liblassoinclude_HEADERS = \
|
||||
strings.h \
|
||||
|
@ -242,10 +115,9 @@ liblassoinclude_HEADERS = \
|
|||
samlp_status.h \
|
||||
samlp_status_code.h \
|
||||
xml_enc.h \
|
||||
tools.h \
|
||||
$(WSF_H_FILES)
|
||||
tools.h
|
||||
|
||||
lasso_private_h_sources = \
|
||||
private.h
|
||||
|
||||
EXTRA_DIST = $(lasso_private_h_sources) xml_idff.h xml_idwsf.h
|
||||
EXTRA_DIST = $(lasso_private_h_sources) xml_idff.h
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_authenticate_requester.h"
|
||||
#include "idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_authenticate_requester
|
||||
* @short_description: <disco:DirectiveType>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:DirectiveType</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs: complexType name="DirectiveType">
|
||||
* <xs: attribute name="descriptionIDRefs" type="xs:IDREFS" use="optional"/>
|
||||
* </xs: complexType>
|
||||
* <xs: element name="AuthenticateRequester" type="DirectiveType"/>
|
||||
*
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "descriptionIDRefs",SNIPPET_ATTRIBUTE,
|
||||
G_STRUCT_OFFSET(LassoDiscoAuthenticateRequester, descriptionIDRefs), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoAuthenticateRequesterClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "AuthenticateRequester");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_authenticate_requester_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoAuthenticateRequesterClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoAuthenticateRequester),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoAuthenticateRequester", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoAuthenticateRequester*
|
||||
lasso_disco_authenticate_requester_new()
|
||||
{
|
||||
LassoDiscoAuthenticateRequester *node;
|
||||
|
||||
node = g_object_new(LASSO_TYPE_DISCO_AUTHENTICATE_REQUESTER, NULL);
|
||||
|
||||
return node;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_AUTHENTICATE_REQUESTER_H__
|
||||
#define __LASSO_DISCO_AUTHENTICATE_REQUESTER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_AUTHENTICATE_REQUESTER (lasso_disco_authenticate_requester_get_type())
|
||||
#define LASSO_DISCO_AUTHENTICATE_REQUESTER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DISCO_AUTHENTICATE_REQUESTER, LassoDiscoAuthenticateRequester))
|
||||
#define LASSO_DISCO_AUTHENTICATE_REQUESTER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_DISCO_AUTHENTICATE_REQUESTER, LassoDiscoAuthenticateRequesterClass))
|
||||
#define LASSO_IS_DISCO_AUTHENTICATE_REQUESTER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_AUTHENTICATE_REQUESTER))
|
||||
#define LASSO_IS_DISCO_AUTHENTICATE_REQUESTER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_DISCO_AUTHENTICATE_REQUESTER))
|
||||
#define LASSO_DISCO_AUTHENTICATE_REQUESTER_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_DISCO_AUTHENTICATE_REQUESTER, LassoDiscoAuthenticateRequesterClass))
|
||||
|
||||
typedef struct _LassoDiscoAuthenticateRequester LassoDiscoAuthenticateRequester;
|
||||
typedef struct _LassoDiscoAuthenticateRequesterClass LassoDiscoAuthenticateRequesterClass;
|
||||
|
||||
struct _LassoDiscoAuthenticateRequester {
|
||||
LassoNode parent;
|
||||
|
||||
gchar *descriptionIDRefs;
|
||||
};
|
||||
|
||||
struct _LassoDiscoAuthenticateRequesterClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_authenticate_requester_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDiscoAuthenticateRequester* lasso_disco_authenticate_requester_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_AUTHENTICATE_REQUESTER_H__ */
|
|
@ -1,102 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_authenticate_session_context.h"
|
||||
#include "idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_authenticate_session_context
|
||||
* @short_description: <disco:DirectiveType>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:DirectiveType</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs: complexType name="DirectiveType">
|
||||
* <xs: attribute name="descriptionIDRefs" type="xs:IDREFS" use="optional"/>
|
||||
* </xs: complexType>
|
||||
* <xs: element name="AuthenticateSessionContext" type="DirectiveType"/>
|
||||
*
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "descriptionIDRefs",SNIPPET_ATTRIBUTE,
|
||||
G_STRUCT_OFFSET(LassoDiscoAuthenticateSessionContext, descriptionIDRefs), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoAuthenticateSessionContextClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "AuthenticateSessionContext");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_authenticate_session_context_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoAuthenticateSessionContextClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoAuthenticateSessionContext),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoAuthenticateSessionContext", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoAuthenticateSessionContext*
|
||||
lasso_disco_authenticate_session_context_new()
|
||||
{
|
||||
LassoDiscoAuthenticateSessionContext *node;
|
||||
|
||||
node = g_object_new(LASSO_TYPE_DISCO_AUTHENTICATE_SESSION_CONTEXT, NULL);
|
||||
|
||||
return node;
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_AUTHENTICATE_SESSION_CONTEXT_H__
|
||||
#define __LASSO_DISCO_AUTHENTICATE_SESSION_CONTEXT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_AUTHENTICATE_SESSION_CONTEXT \
|
||||
(lasso_disco_authenticate_session_context_get_type())
|
||||
#define LASSO_DISCO_AUTHENTICATE_SESSION_CONTEXT(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DISCO_AUTHENTICATE_SESSION_CONTEXT, LassoDiscoAuthenticateSessionContext))
|
||||
#define LASSO_DISCO_AUTHENTICATE_SESSION_CONTEXT_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_DISCO_AUTHENTICATE_SESSION_CONTEXT, LassoDiscoAuthenticateSessionContextClass))
|
||||
#define LASSO_IS_DISCO_AUTHENTICATE_SESSION_CONTEXT(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_AUTHENTICATE_SESSION_CONTEXT))
|
||||
#define LASSO_IS_DISCO_AUTHENTICATE_SESSION_CONTEXT_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_DISCO_AUTHENTICATE_SESSION_CONTEXT))
|
||||
#define LASSO_DISCO_AUTHENTICATE_SESSION_CONTEXT_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_DISCO_AUTHENTICATE_SESSION_CONTEXT, LassoDiscoAuthenticateSessionContextClass))
|
||||
|
||||
typedef struct _LassoDiscoAuthenticateSessionContext LassoDiscoAuthenticateSessionContext;
|
||||
typedef struct _LassoDiscoAuthenticateSessionContextClass
|
||||
LassoDiscoAuthenticateSessionContextClass;
|
||||
|
||||
struct _LassoDiscoAuthenticateSessionContext {
|
||||
LassoNode parent;
|
||||
|
||||
gchar *descriptionIDRefs;
|
||||
};
|
||||
|
||||
struct _LassoDiscoAuthenticateSessionContextClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_authenticate_session_context_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDiscoAuthenticateSessionContext* \
|
||||
lasso_disco_authenticate_session_context_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_AUTHENTICATE_SESSION_CONTEXT_H__ */
|
|
@ -1,102 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_authorize_requester.h"
|
||||
#include "idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_authorize_requester
|
||||
* @short_description: <disco:DirectiveType>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:DirectiveType</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs: complexType name="DirectiveType">
|
||||
* <xs: attribute name="descriptionIDRefs" type="xs:IDREFS" use="optional"/>
|
||||
* </xs: complexType>
|
||||
* <xs: element name="AuthorizeRequester" type="DirectiveType"/>
|
||||
*
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "descriptionIDRefs",SNIPPET_ATTRIBUTE,
|
||||
G_STRUCT_OFFSET(LassoDiscoAuthorizeRequester, descriptionIDRefs), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoAuthorizeRequesterClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "AuthorizeRequester");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_authorize_requester_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoAuthorizeRequesterClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoAuthorizeRequester),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoAuthorizeRequester", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoAuthorizeRequester*
|
||||
lasso_disco_authorize_requester_new()
|
||||
{
|
||||
LassoDiscoAuthorizeRequester *node;
|
||||
|
||||
node = g_object_new(LASSO_TYPE_DISCO_AUTHORIZE_REQUESTER, NULL);
|
||||
|
||||
return node;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_AUTHORIZE_REQUESTER_H__
|
||||
#define __LASSO_DISCO_AUTHORIZE_REQUESTER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_AUTHORIZE_REQUESTER (lasso_disco_authorize_requester_get_type())
|
||||
#define LASSO_DISCO_AUTHORIZE_REQUESTER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DISCO_AUTHORIZE_REQUESTER, LassoDiscoAuthorizeRequester))
|
||||
#define LASSO_DISCO_AUTHORIZE_REQUESTER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_DISCO_AUTHORIZE_REQUESTER, LassoDiscoAuthorizeRequesterClass))
|
||||
#define LASSO_IS_DISCO_AUTHORIZE_REQUESTER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_AUTHORIZE_REQUESTER))
|
||||
#define LASSO_IS_DISCO_AUTHORIZE_REQUESTER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_DISCO_AUTHORIZE_REQUESTER))
|
||||
#define LASSO_DISCO_AUTHORIZE_REQUESTER_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_DISCO_AUTHORIZE_REQUESTER, LassoDiscoAuthorizeRequesterClass))
|
||||
|
||||
typedef struct _LassoDiscoAuthorizeRequester LassoDiscoAuthorizeRequester;
|
||||
typedef struct _LassoDiscoAuthorizeRequesterClass LassoDiscoAuthorizeRequesterClass;
|
||||
|
||||
struct _LassoDiscoAuthorizeRequester {
|
||||
LassoNode parent;
|
||||
|
||||
gchar *descriptionIDRefs;
|
||||
};
|
||||
|
||||
struct _LassoDiscoAuthorizeRequesterClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_authorize_requester_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDiscoAuthorizeRequester* lasso_disco_authorize_requester_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_AUTHORIZE_REQUESTER_H__ */
|
|
@ -1,104 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_credentials.h"
|
||||
#include "idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_credentials
|
||||
* @short_description: <disco:Credentials>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:Credentials</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs:element name="Credentials" minOccurs="0">
|
||||
* <xs:complexType>
|
||||
* <xs:sequence>
|
||||
* <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
* </xs:sequence>
|
||||
* </xs:complexType>
|
||||
* </xs:element>
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "", SNIPPET_LIST_XMLNODES, G_STRUCT_OFFSET(LassoDiscoCredentials, any), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoCredentialsClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "Credentials");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_credentials_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoCredentialsClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoCredentials),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoCredentials", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoCredentials*
|
||||
lasso_disco_credentials_new()
|
||||
{
|
||||
LassoDiscoCredentials *node;
|
||||
|
||||
node = g_object_new(LASSO_TYPE_DISCO_CREDENTIALS, NULL);
|
||||
|
||||
return node;
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_CREDENTIALS_H__
|
||||
#define __LASSO_DISCO_CREDENTIALS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_CREDENTIALS (lasso_disco_credentials_get_type())
|
||||
#define LASSO_DISCO_CREDENTIALS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DISCO_CREDENTIALS, LassoDiscoCredentials))
|
||||
#define LASSO_DISCO_CREDENTIALS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_DISCO_CREDENTIALS, LassoDiscoCredentialsClass))
|
||||
#define LASSO_IS_DISCO_CREDENTIALS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
|
||||
LASSO_TYPE_DISCO_CREDENTIALS))
|
||||
#define LASSO_IS_DISCO_CREDENTIALS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||
LASSO_TYPE_DISCO_CREDENTIALS))
|
||||
#define LASSO_DISCO_CREDENTIALS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_DISCO_CREDENTIALS, LassoDiscoCredentialsClass))
|
||||
|
||||
typedef struct _LassoDiscoCredentials LassoDiscoCredentials;
|
||||
typedef struct _LassoDiscoCredentialsClass LassoDiscoCredentialsClass;
|
||||
|
||||
struct _LassoDiscoCredentials {
|
||||
LassoNode parent;
|
||||
|
||||
GList *any; /* of xmlNode */
|
||||
};
|
||||
|
||||
struct _LassoDiscoCredentialsClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_credentials_get_type(void);
|
||||
LASSO_EXPORT LassoDiscoCredentials* lasso_disco_credentials_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_CREDENTIALS_H__ */
|
|
@ -1,279 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_description.h"
|
||||
#include "idwsf_strings.h"
|
||||
#include "../id-wsf/wsf_utils.h"
|
||||
#include "../utils.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_description
|
||||
* @short_description: <disco:DescriptionType>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:DescriptionType</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs:complexType name="DescriptionType">
|
||||
* <xs:sequence>
|
||||
* <xs:element name="SecurityMechID" type="xs:anyURI" minOccurs="1" maxOccurs="unbounded"/>
|
||||
* <xs:element name="CredentialRef" type="xs:IDREF" minOccurs="0" maxOccurs="unbounded"/>
|
||||
* <xs:choice>
|
||||
* <xs:group ref="WsdlRef"/>
|
||||
* <xs:group ref="BriefSoapHttpDescription"/>
|
||||
* </xs:choice>
|
||||
* </xs:sequence>
|
||||
* <xs:attribute name="id" type="xs:ID"/>
|
||||
* </xs:complexType>
|
||||
*
|
||||
* <xs:group name="WsdlRef">
|
||||
* <xs:sequence>
|
||||
* <xs:element name="WsdlURI" type="xs:anyURI"/>
|
||||
* <xs:element name="ServiceNameRef" type="xs:QName"/>
|
||||
* </xs:sequence>
|
||||
* </xs:group>
|
||||
*
|
||||
* <xs:group name="BriefSoapHttpDescription">
|
||||
* <xs:sequence>
|
||||
* <xs:element name="Endpoint" type="xs:anyURI"/>
|
||||
* <xs:element name="SoapAction" type="xs:anyURI" minOccurs="0"/>
|
||||
* </xs:sequence>
|
||||
* </xs:group>
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "SecurityMechID", SNIPPET_LIST_CONTENT,
|
||||
G_STRUCT_OFFSET(LassoDiscoDescription, SecurityMechID), NULL, NULL, NULL},
|
||||
{ "CredentialRef", SNIPPET_LIST_CONTENT,
|
||||
G_STRUCT_OFFSET(LassoDiscoDescription, CredentialRef), NULL, NULL, NULL},
|
||||
{ "WsdlURI", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoDiscoDescription, WsdlURI), NULL, NULL, NULL},
|
||||
{ "ServiceNameRef", SNIPPET_CONTENT,
|
||||
G_STRUCT_OFFSET(LassoDiscoDescription, ServiceNameRef), NULL, NULL, NULL},
|
||||
{ "Endpoint", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoDiscoDescription, Endpoint), NULL, NULL, NULL},
|
||||
{ "SoapAction", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoDiscoDescription, SoapAction), NULL, NULL, NULL},
|
||||
{ "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoDiscoDescription, id), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoDescriptionClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "Description");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_description_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoDescriptionClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoDescription),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoDescription", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoDescription*
|
||||
lasso_disco_description_new()
|
||||
{
|
||||
LassoDiscoDescription *description;
|
||||
|
||||
description = g_object_new(LASSO_TYPE_DISCO_DESCRIPTION, NULL);
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
LassoDiscoDescription*
|
||||
lasso_disco_description_new_with_WsdlRef(const gchar *securityMechID,
|
||||
const gchar *wsdlURI,
|
||||
const gchar *serviceNameRef)
|
||||
{
|
||||
LassoDiscoDescription *description;
|
||||
|
||||
g_return_val_if_fail(securityMechID != NULL, NULL);
|
||||
g_return_val_if_fail(wsdlURI != NULL, NULL);
|
||||
g_return_val_if_fail(serviceNameRef != NULL, NULL);
|
||||
|
||||
description = g_object_new(LASSO_TYPE_DISCO_DESCRIPTION, NULL);
|
||||
|
||||
description->SecurityMechID = g_list_append(description->SecurityMechID,
|
||||
g_strdup(securityMechID));
|
||||
description->WsdlURI = g_strdup(wsdlURI);
|
||||
description->ServiceNameRef = g_strdup(serviceNameRef);
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
LassoDiscoDescription*
|
||||
lasso_disco_description_new_with_BriefSoapHttpDescription(const gchar *securityMechID,
|
||||
const gchar *endpoint,
|
||||
const gchar *soapAction)
|
||||
{
|
||||
LassoDiscoDescription *description;
|
||||
|
||||
g_return_val_if_fail(securityMechID != NULL, NULL);
|
||||
g_return_val_if_fail(endpoint != NULL, NULL);
|
||||
|
||||
description = g_object_new(LASSO_TYPE_DISCO_DESCRIPTION, NULL);
|
||||
|
||||
description->SecurityMechID = g_list_append(description->SecurityMechID,
|
||||
g_strdup(securityMechID));
|
||||
description->Endpoint = g_strdup(endpoint);
|
||||
if (soapAction != NULL) {
|
||||
description->SoapAction = g_strdup(soapAction);
|
||||
}
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
LassoDiscoDescription*
|
||||
lasso_disco_description_copy(LassoDiscoDescription *description)
|
||||
{
|
||||
LassoDiscoDescription *newDescription;
|
||||
GList *securityMechIds, *credentialRefs;
|
||||
|
||||
newDescription = g_object_new(LASSO_TYPE_DISCO_DESCRIPTION, NULL);
|
||||
|
||||
securityMechIds = description->SecurityMechID;
|
||||
while (securityMechIds) {
|
||||
newDescription->SecurityMechID = g_list_append(newDescription->SecurityMechID,
|
||||
g_strdup(securityMechIds->data));
|
||||
securityMechIds = securityMechIds->next;
|
||||
}
|
||||
|
||||
credentialRefs = description->CredentialRef;
|
||||
while (credentialRefs) {
|
||||
newDescription->CredentialRef = g_list_append(newDescription->CredentialRef,
|
||||
g_strdup(credentialRefs->data));
|
||||
credentialRefs = credentialRefs->next;
|
||||
}
|
||||
|
||||
newDescription->WsdlURI = g_strdup(description->WsdlURI);
|
||||
newDescription->ServiceNameRef = g_strdup(description->ServiceNameRef);
|
||||
|
||||
if (description->Endpoint) {
|
||||
newDescription->Endpoint = g_strdup(description->Endpoint);
|
||||
}
|
||||
if (description->SoapAction) {
|
||||
newDescription->SoapAction = g_strdup(description->SoapAction);
|
||||
}
|
||||
|
||||
if (description->id) {
|
||||
newDescription->id = g_strdup(description->id);
|
||||
}
|
||||
|
||||
return newDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_disco_description_has_saml_authentication:
|
||||
* @profile: a #LassoDiscoDescription
|
||||
*
|
||||
* Checks if the given description supports any security mechanism using
|
||||
* SAML authentication.
|
||||
*
|
||||
* Returns: %TRUE if SAML is supported by the service description, FALSE if it
|
||||
* is not supported of if description is not a valid #LassoDiscoDescription.
|
||||
*/
|
||||
gboolean
|
||||
lasso_disco_description_has_saml_authentication(LassoDiscoDescription *description)
|
||||
{
|
||||
GList *iter;
|
||||
gchar *security_mech_id;
|
||||
|
||||
lasso_return_val_if_invalid_param(DISCO_DESCRIPTION, description,
|
||||
FALSE);
|
||||
|
||||
iter = description->SecurityMechID;
|
||||
while (iter) {
|
||||
security_mech_id = iter->data;
|
||||
if (lasso_security_mech_id_is_saml_authentication(
|
||||
security_mech_id)) {
|
||||
return TRUE;
|
||||
}
|
||||
iter = g_list_next(iter);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* lasso_disco_description_has_x509_authentication:
|
||||
* @profile: a #LassoDiscoDescription
|
||||
*
|
||||
* Checks if the given description supports any security mechanism using
|
||||
* X509 authentication.
|
||||
*
|
||||
* Returns: %TRUE if X509 is supported by the service description, FALSE if it
|
||||
* is not supported of if description is not a valid #LassoDiscoDescription.
|
||||
*/
|
||||
gboolean
|
||||
lasso_disco_description_has_x509_authentication(LassoDiscoDescription *description)
|
||||
{
|
||||
GList *iter;
|
||||
gchar *security_mech_id;
|
||||
|
||||
lasso_return_val_if_invalid_param(DISCO_DESCRIPTION, description,
|
||||
FALSE);
|
||||
|
||||
iter = description->SecurityMechID;
|
||||
while (iter) {
|
||||
security_mech_id = iter->data;
|
||||
if (lasso_security_mech_id_is_x509_authentication(
|
||||
security_mech_id)) {
|
||||
return TRUE;
|
||||
}
|
||||
iter = g_list_next(iter);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_DESCRIPTION_H__
|
||||
#define __LASSO_DISCO_DESCRIPTION_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_DESCRIPTION (lasso_disco_description_get_type())
|
||||
#define LASSO_DISCO_DESCRIPTION(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_DISCO_DESCRIPTION, LassoDiscoDescription))
|
||||
#define LASSO_DISCO_DESCRIPTION_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_DISCO_DESCRIPTION, \
|
||||
LassoDiscoDescriptionClass))
|
||||
#define LASSO_IS_DISCO_DESCRIPTION(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_DESCRIPTION))
|
||||
#define LASSO_IS_DISCO_DESCRIPTION_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_DISCO_DESCRIPTION))
|
||||
#define LASSO_DISCO_DESCRIPTION_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DISCO_DESCRIPTION, \
|
||||
LassoDiscoDescriptionClass))
|
||||
|
||||
typedef struct _LassoDiscoDescription LassoDiscoDescription;
|
||||
typedef struct _LassoDiscoDescriptionClass LassoDiscoDescriptionClass;
|
||||
|
||||
struct _LassoDiscoDescription {
|
||||
LassoNode parent;
|
||||
|
||||
/*
|
||||
* - The service instance description SHOULD list of all of the security mechanisms that
|
||||
* the service instance supports.
|
||||
* - The client SHOULD pick the first mechanism (in the order listed) that it supports;
|
||||
* the description SHOULD list them in order of preference, to avoid situations where the
|
||||
* client fails to gain access to the service because it picked the wrong security
|
||||
* mechanism.
|
||||
*/
|
||||
GList *SecurityMechID; /* of strings */
|
||||
GList *CredentialRef; /* of strings */
|
||||
|
||||
/* WsdlRef group */
|
||||
gchar *WsdlURI;
|
||||
gchar *ServiceNameRef;
|
||||
|
||||
/* BriefSoapHttpDescription group */
|
||||
gchar *Endpoint;
|
||||
gchar *SoapAction;
|
||||
|
||||
char *id;
|
||||
};
|
||||
|
||||
struct _LassoDiscoDescriptionClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_description_get_type (void);
|
||||
|
||||
LASSO_EXPORT LassoDiscoDescription *lasso_disco_description_copy(
|
||||
LassoDiscoDescription *description);
|
||||
|
||||
LASSO_EXPORT LassoDiscoDescription* lasso_disco_description_new();
|
||||
|
||||
LASSO_EXPORT LassoDiscoDescription* lasso_disco_description_new_with_WsdlRef(
|
||||
const gchar *securityMechID,
|
||||
const gchar *wsdlURI,
|
||||
const gchar *serviceNameRef);
|
||||
|
||||
LASSO_EXPORT LassoDiscoDescription* lasso_disco_description_new_with_BriefSoapHttpDescription(
|
||||
const gchar *securityMechID,
|
||||
const gchar *endpoint,
|
||||
const gchar *soapAction);
|
||||
|
||||
LASSO_EXPORT gboolean lasso_disco_description_has_saml_authentication(
|
||||
LassoDiscoDescription *description);
|
||||
|
||||
LASSO_EXPORT gboolean lasso_disco_description_has_x509_authentication(
|
||||
LassoDiscoDescription *description);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_DESCRIPTION_H__ */
|
|
@ -1,102 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_encrypt_resource_id.h"
|
||||
#include "idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_encrypt_resource_id
|
||||
* @short_description: <disco:DirectiveType>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:DirectiveType</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs: complexType name="DirectiveType">
|
||||
* <xs: attribute name="descriptionIDRefs" type="xs:IDREFS" use="optional"/>
|
||||
* </xs: complexType>
|
||||
* <xs: element name="EncryptResourceID" type="DirectiveType"/>
|
||||
*
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "descriptionIDRefs",SNIPPET_ATTRIBUTE,
|
||||
G_STRUCT_OFFSET(LassoDiscoEncryptResourceID, descriptionIDRefs), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoEncryptResourceIDClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "EncryptResourceID");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_encrypt_resource_id_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoEncryptResourceIDClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoEncryptResourceID),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoEncryptResourceID", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoEncryptResourceID*
|
||||
lasso_disco_encrypt_resource_id_new()
|
||||
{
|
||||
LassoDiscoEncryptResourceID *node;
|
||||
|
||||
node = g_object_new(LASSO_TYPE_DISCO_ENCRYPT_RESOURCE_ID, NULL);
|
||||
|
||||
return node;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_ENCRYPT_RESOURCE_ID_H__
|
||||
#define __LASSO_DISCO_ENCRYPT_RESOURCE_ID_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_ENCRYPT_RESOURCE_ID (lasso_disco_encrypt_resource_id_get_type())
|
||||
#define LASSO_DISCO_ENCRYPT_RESOURCE_ID(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DISCO_ENCRYPT_RESOURCE_ID, LassoDiscoEncryptResourceID))
|
||||
#define LASSO_DISCO_ENCRYPT_RESOURCE_ID_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_DISCO_ENCRYPT_RESOURCE_ID, \
|
||||
LassoDiscoEncryptResourceIDClass))
|
||||
#define LASSO_IS_DISCO_ENCRYPT_RESOURCE_ID(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_ENCRYPT_RESOURCE_ID))
|
||||
#define LASSO_IS_DISCO_ENCRYPT_RESOURCE_ID_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_DISCO_ENCRYPT_RESOURCE_ID))
|
||||
#define LASSO_DISCO_ENCRYPT_RESOURCE_ID_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_DISCO_ENCRYPT_RESOURCE_ID, LassoDiscoEncryptResourceIDClass))
|
||||
|
||||
typedef struct _LassoDiscoEncryptResourceID LassoDiscoEncryptResourceID;
|
||||
typedef struct _LassoDiscoEncryptResourceIDClass LassoDiscoEncryptResourceIDClass;
|
||||
|
||||
struct _LassoDiscoEncryptResourceID {
|
||||
LassoNode parent;
|
||||
|
||||
gchar *descriptionIDRefs;
|
||||
};
|
||||
|
||||
struct _LassoDiscoEncryptResourceIDClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_encrypt_resource_id_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDiscoEncryptResourceID* lasso_disco_encrypt_resource_id_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_ENCRYPT_RESOURCE_ID_H__ */
|
|
@ -1,109 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_encrypted_resource_id.h"
|
||||
#include "idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_encrypted_resource_id
|
||||
* @short_description: <disco:EncryptedResourceID>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:EncryptedResourceID</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs:element name="EncryptedResourceID" type="EncryptedResourceIDType"/>
|
||||
* <xs:complexType name="EncryptedResourceIDType">
|
||||
* <xs:sequence>
|
||||
* <xs:element ref="xenc:EncryptedData"/>
|
||||
* <xs:element ref="xenc:EncryptedKey"/>
|
||||
* </xs:sequence>
|
||||
* </xs:complexType>
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "EncryptedData", SNIPPET_XMLNODE,
|
||||
G_STRUCT_OFFSET(LassoDiscoEncryptedResourceID, EncryptedData), NULL,
|
||||
LASSO_XMLENC_PREFIX, LASSO_XMLENC_HREF},
|
||||
{ "EncryptedKey", SNIPPET_LIST_XMLNODES,
|
||||
G_STRUCT_OFFSET(LassoDiscoEncryptedResourceID, EncryptedKey), NULL,
|
||||
LASSO_XMLENC_PREFIX, LASSO_XMLENC_HREF},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoEncryptedResourceIDClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "EncryptedResourceID");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_encrypted_resource_id_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoEncryptedResourceIDClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoEncryptedResourceID),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoEncryptedResourceID",
|
||||
&this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoEncryptedResourceID*
|
||||
lasso_disco_encrypted_resource_id_new()
|
||||
{
|
||||
LassoDiscoEncryptedResourceID *node;
|
||||
|
||||
node = g_object_new(LASSO_TYPE_DISCO_ENCRYPTED_RESOURCE_ID, NULL);
|
||||
|
||||
return node;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_ENCRYPTED_RESOURCE_ID_H__
|
||||
#define __LASSO_DISCO_ENCRYPTED_RESOURCE_ID_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_ENCRYPTED_RESOURCE_ID (lasso_disco_encrypted_resource_id_get_type())
|
||||
#define LASSO_DISCO_ENCRYPTED_RESOURCE_ID(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DISCO_ENCRYPTED_RESOURCE_ID, LassoDiscoEncryptedResourceID))
|
||||
#define LASSO_DISCO_ENCRYPTED_RESOURCE_ID_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_DISCO_ENCRYPTED_RESOURCE_ID, \
|
||||
LassoDiscoEncryptedResourceIDClass))
|
||||
#define LASSO_IS_DISCO_ENCRYPTED_RESOURCE_ID(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_ENCRYPTED_RESOURCE_ID))
|
||||
#define LASSO_IS_DISCO_ENCRYPTED_RESOURCE_ID_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_DISCO_ENCRYPTED_RESOURCE_ID))
|
||||
#define LASSO_DISCO_ENCRYPTED_RESOURCE_ID_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DISCO_ENCRYPTED_RESOURCE_ID, \
|
||||
LassoDiscoEncryptedResourceIDClass))
|
||||
|
||||
typedef struct _LassoDiscoEncryptedResourceID LassoDiscoEncryptedResourceID;
|
||||
typedef struct _LassoDiscoEncryptedResourceIDClass LassoDiscoEncryptedResourceIDClass;
|
||||
|
||||
struct _LassoDiscoEncryptedResourceID {
|
||||
LassoNode parent;
|
||||
|
||||
xmlNode *EncryptedData;
|
||||
GList *EncryptedKey; /* of xmlNode* */
|
||||
};
|
||||
|
||||
struct _LassoDiscoEncryptedResourceIDClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_encrypted_resource_id_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDiscoEncryptedResourceID* lasso_disco_encrypted_resource_id_new();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_ENCRYPTED_RESOURCE_ID_H__ */
|
|
@ -1,102 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_generate_bearer_token.h"
|
||||
#include "idwsf_strings.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_generate_bearer_token
|
||||
* @short_description: <disco:DirectiveType>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:DirectiveType</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs: complexType name="DirectiveType">
|
||||
* <xs: attribute name="descriptionIDRefs" type="xs:IDREFS" use="optional"/>
|
||||
* </xs: complexType>
|
||||
* <xs: element name="GenerateBearerToken" type="disco: DirectiveType"/>
|
||||
*
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "descriptionIDRefs",SNIPPET_ATTRIBUTE,
|
||||
G_STRUCT_OFFSET(LassoDiscoGenerateBearerToken, descriptionIDRefs), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoGenerateBearerTokenClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "GenerateBearerToken");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_generate_bearer_token_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoGenerateBearerTokenClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoGenerateBearerToken),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoGenerateBearerToken", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoGenerateBearerToken*
|
||||
lasso_disco_generate_bearer_token_new()
|
||||
{
|
||||
LassoDiscoGenerateBearerToken *node;
|
||||
|
||||
node = g_object_new(LASSO_TYPE_DISCO_GENERATE_BEARER_TOKEN, NULL);
|
||||
|
||||
return node;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_GENERATE_BEARER_TOKEN_H__
|
||||
#define __LASSO_DISCO_GENERATE_BEARER_TOKEN_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_GENERATE_BEARER_TOKEN (lasso_disco_generate_bearer_token_get_type())
|
||||
#define LASSO_DISCO_GENERATE_BEARER_TOKEN(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), \
|
||||
LASSO_TYPE_DISCO_GENERATE_BEARER_TOKEN, LassoDiscoGenerateBearerToken))
|
||||
#define LASSO_DISCO_GENERATE_BEARER_TOKEN_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), \
|
||||
LASSO_TYPE_DISCO_GENERATE_BEARER_TOKEN, LassoDiscoGenerateBearerTokenClass))
|
||||
#define LASSO_IS_DISCO_GENERATE_BEARER_TOKEN(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_GENERATE_BEARER_TOKEN))
|
||||
#define LASSO_IS_DISCO_GENERATE_BEARER_TOKEN_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass),LASSO_TYPE_DISCO_GENERATE_BEARER_TOKEN))
|
||||
#define LASSO_DISCO_GENERATE_BEARER_TOKEN_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), \
|
||||
LASSO_TYPE_DISCO_GENERATE_BEARER_TOKEN, LassoDiscoGenerateBearerTokenClass))
|
||||
|
||||
typedef struct _LassoDiscoGenerateBearerToken LassoDiscoGenerateBearerToken;
|
||||
typedef struct _LassoDiscoGenerateBearerTokenClass LassoDiscoGenerateBearerTokenClass;
|
||||
|
||||
struct _LassoDiscoGenerateBearerToken {
|
||||
LassoNode parent;
|
||||
|
||||
gchar *descriptionIDRefs;
|
||||
};
|
||||
|
||||
struct _LassoDiscoGenerateBearerTokenClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_generate_bearer_token_get_type(void);
|
||||
|
||||
LASSO_EXPORT LassoDiscoGenerateBearerToken* lasso_disco_generate_bearer_token_new(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_GENERATE_BEARER_TOKEN_H__ */
|
|
@ -1,108 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "private.h"
|
||||
#include "disco_insert_entry.h"
|
||||
#include "idwsf_strings.h"
|
||||
#include "../utils.h"
|
||||
|
||||
/**
|
||||
* SECTION:disco_insert_entry
|
||||
* @short_description: <disco:InsertEntryType>
|
||||
*
|
||||
* <figure><title>Schema fragment for disco:InsertEntryType</title>
|
||||
* <programlisting><![CDATA[
|
||||
*
|
||||
* <xs:complexType name="InsertEntryType">
|
||||
* <xs:sequence>
|
||||
* <xs:element ref="ResourceOffering"/>
|
||||
* <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
* </xs:sequence>
|
||||
* </xs:complexType>
|
||||
* ]]></programlisting>
|
||||
* </figure>
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
/* private methods */
|
||||
/*****************************************************************************/
|
||||
|
||||
static struct XmlSnippet schema_snippets[] = {
|
||||
{ "ResourceOffering", SNIPPET_NODE,
|
||||
G_STRUCT_OFFSET(LassoDiscoInsertEntry, ResourceOffering), NULL, NULL, NULL},
|
||||
{ "", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoDiscoInsertEntry, any), NULL, NULL, NULL},
|
||||
{NULL, 0, 0, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* instance and class init functions */
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
class_init(LassoDiscoInsertEntryClass *klass, void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
|
||||
|
||||
nclass->node_data = g_new0(LassoNodeClassData, 1);
|
||||
lasso_node_class_set_nodename(nclass, "InsertEntry");
|
||||
lasso_node_class_set_ns(nclass, LASSO_DISCO_HREF, LASSO_DISCO_PREFIX);
|
||||
lasso_node_class_add_snippets(nclass, schema_snippets);
|
||||
}
|
||||
|
||||
GType
|
||||
lasso_disco_insert_entry_get_type()
|
||||
{
|
||||
static GType this_type = 0;
|
||||
|
||||
if (!this_type) {
|
||||
static const GTypeInfo this_info = {
|
||||
sizeof (LassoDiscoInsertEntryClass),
|
||||
NULL,
|
||||
NULL,
|
||||
(GClassInitFunc) class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
sizeof(LassoDiscoInsertEntry),
|
||||
0,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
this_type = g_type_register_static(LASSO_TYPE_NODE,
|
||||
"LassoDiscoInsertEntry", &this_info, 0);
|
||||
}
|
||||
return this_type;
|
||||
}
|
||||
|
||||
LassoDiscoInsertEntry*
|
||||
lasso_disco_insert_entry_new(LassoDiscoResourceOffering *resourceOffering)
|
||||
{
|
||||
LassoDiscoInsertEntry *insertEntry;
|
||||
|
||||
g_return_val_if_fail(LASSO_IS_DISCO_RESOURCE_OFFERING(resourceOffering) == TRUE, NULL);
|
||||
|
||||
insertEntry = g_object_new(LASSO_TYPE_DISCO_INSERT_ENTRY, NULL);
|
||||
lasso_assign_gobject(insertEntry->ResourceOffering, resourceOffering);
|
||||
|
||||
return insertEntry;
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
/* $Id$
|
||||
*
|
||||
* Lasso - A free implementation of the Liberty Alliance specifications.
|
||||
*
|
||||
* Copyright (C) 2004-2007 Entr'ouvert
|
||||
* http://lasso.entrouvert.org
|
||||
*
|
||||
* Authors: See AUTHORS file in top-level directory.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __LASSO_DISCO_INSERT_ENTRY_H__
|
||||
#define __LASSO_DISCO_INSERT_ENTRY_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include "xml.h"
|
||||
#include "disco_resource_offering.h"
|
||||
|
||||
#define LASSO_TYPE_DISCO_INSERT_ENTRY (lasso_disco_insert_entry_get_type())
|
||||
#define LASSO_DISCO_INSERT_ENTRY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_DISCO_INSERT_ENTRY, LassoDiscoInsertEntry))
|
||||
#define LASSO_DISCO_INSERT_ENTRY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_DISCO_INSERT_ENTRY, \
|
||||
LassoDiscoInsertEntryClass))
|
||||
#define LASSO_IS_DISCO_INSERT_ENTRY(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_DISCO_INSERT_ENTRY))
|
||||
#define LASSO_IS_DISCO_INSERT_ENTRY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_DISCO_INSERT_ENTRY))
|
||||
#define LASSO_DISCO_INSERT_ENTRY_GET_CLASS(o) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_DISCO_INSERT_ENTRY, \
|
||||
LassoDiscoInsertEntryClass))
|
||||
|
||||
typedef struct _LassoDiscoInsertEntry LassoDiscoInsertEntry;
|
||||
typedef struct _LassoDiscoInsertEntryClass LassoDiscoInsertEntryClass;
|
||||
|
||||
struct _LassoDiscoInsertEntry {
|
||||
LassoNode parent;
|
||||
|
||||
LassoDiscoResourceOffering *ResourceOffering;
|
||||
GList *any; /* of LassoNode */
|
||||
};
|
||||
|
||||
struct _LassoDiscoInsertEntryClass {
|
||||
LassoNodeClass parent;
|
||||
};
|
||||
|
||||
LASSO_EXPORT GType lasso_disco_insert_entry_get_type(void);
|
||||
LASSO_EXPORT LassoDiscoInsertEntry* lasso_disco_insert_entry_new(
|
||||
LassoDiscoResourceOffering *resourceOffering);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __LASSO_DISCO_INSERT_ENTRY_H__ */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue