Genivia Home Documentation
wstapi.c File Reference

updated Tue Nov 23 2021 by Robert van Engelen
 
Functions | Variables
wstapi.c File Reference
#include "wstapi.h"
Include dependency graph for wstapi.c:

Functions

SOAP_FMAC1 int SOAP_FMAC2 soap_wst_request_saml_token (struct soap *soap, const char *endpoint, int soapver, const char *applyto, const char *username, const char *password, saml1__AssertionType **saml1, saml2__AssertionType **saml2)
 Request SAML 1.0 or SAML 2.0 token. Verifies the SAML signature, which requires soap->cafile to be set. Does not verify the conditions of the SAML token, such as NotBefore and NotOnOrAfter, which has to be done explicitly as shown in the documentation. More...
 
SOAP_FMAC1 int SOAP_FMAC2 soap_wst_request_psha1_token (struct soap *soap, const char *endpoint, int soapver, const char *applyto, const char *username, const char *password, char *psha1, size_t psha1len)
 Request PSHA1 token. More...
 

Variables

const char * soap_wst_rst_action = SOAP_NAMESPACE_OF_wst "/RST/Issue"
 
const char * soap_wst_rstr_action = SOAP_NAMESPACE_OF_wst "/RSTR/Issue"
 
const char * soap_wst_rstc_action = SOAP_NAMESPACE_OF_wst "/RSTC/Issue"
 
const char * soap_wst_rstrc_action = SOAP_NAMESPACE_OF_wst "/RSTRC/IssueFinal"
 
struct Namespace soap11_namespaces []
 
struct Namespace soap12_namespaces []
 

Function Documentation

◆ soap_wst_request_psha1_token()

SOAP_FMAC1 int SOAP_FMAC2 soap_wst_request_psha1_token ( struct soap *  soap,
const char *  endpoint,
int  soapver,
const char *  applyto,
const char *  username,
const char *  password,
char *  psha1,
size_t  psha1len 
)

Request PSHA1 token.

Parameters
soapcontext
endpointservice endpoint URL (send to)
soapverSOAP version 1 = SOAP 1.1, 2 = SOAP 1.2 (recommended)
applytoservice domain
usernameauthentication or NULL
passwordauthentication or NULL
psha1filled with the PSHA1 result token of psa1len bytes
psha1lentoken size in bytes
Returns
SOAP_OK or error code

◆ soap_wst_request_saml_token()

SOAP_FMAC1 int SOAP_FMAC2 soap_wst_request_saml_token ( struct soap *  soap,
const char *  endpoint,
int  soapver,
const char *  applyto,
const char *  username,
const char *  password,
saml1__AssertionType **  saml1,
saml2__AssertionType **  saml2 
)

Request SAML 1.0 or SAML 2.0 token. Verifies the SAML signature, which requires soap->cafile to be set. Does not verify the conditions of the SAML token, such as NotBefore and NotOnOrAfter, which has to be done explicitly as shown in the documentation.

Parameters
soapcontext
endpointservice endpoint URL (send to)
soapverSOAP version 1 = SOAP 1.1, 2 = SOAP 1.2 (recommended)
applytoservice domain
usernameauthentication or NULL
passwordauthentication or NULL
saml1if non-NULL, requests SAML 1.0 and upon return points to a pointer that is set to the SAML 1.0 assertion received
saml2if non-NULL, requests SAML 2.0 and upon return points to a pointer that is set to the SAML 2.0 assertion received
Returns
SOAP_OK or error code

Variable Documentation

◆ soap11_namespaces

struct Namespace soap11_namespaces[]
Initial value:
= {
{"SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", "http://www.w3.org/*/soap-envelope", NULL},
{"SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", "http://www.w3.org/*/soap-encoding", NULL},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
{"c14n", "http://www.w3.org/2001/10/xml-exc-c14n#", NULL, NULL},
{"ds", "http://www.w3.org/2000/09/xmldsig#", NULL, NULL},
{"saml1", SOAP_NAMESPACE_OF_saml1, NULL, NULL},
{"saml2", SOAP_NAMESPACE_OF_saml2, NULL, NULL},
{"xenc", "http://www.w3.org/2001/04/xmlenc#", NULL, NULL},
{"wsc", "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512", "http://schemas.xmlsoap.org/ws/2005/02/sc", NULL},
{"wsse", SOAP_NAMESPACE_OF_wsse, "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", NULL},
{"chan", "http://schemas.microsoft.com/ws/2005/02/duplex", NULL, NULL},
{"wsa5", "http://www.w3.org/2005/08/addressing", "http://schemas.xmlsoap.org/ws/2004/08/addressing", NULL},
{"wsp", "http://schemas.xmlsoap.org/ws/2004/09/policy", NULL, NULL},
{"wsu", SOAP_NAMESPACE_OF_wsu, NULL, NULL},
{"wst", SOAP_NAMESPACE_OF_wst, "http://schemas.xmlsoap.org/ws/2005/02/trust", NULL},
{NULL, NULL, NULL, NULL}
}
#define SOAP_NAMESPACE_OF_saml1
Definition: saml1.h:56
#define SOAP_NAMESPACE_OF_saml2
Definition: saml2.h:56
#define SOAP_NAMESPACE_OF_wsse
Definition: wsse.h:51
#define SOAP_NAMESPACE_OF_wst
Definition: wst.h:67
#define SOAP_NAMESPACE_OF_wsu
Definition: wsu.h:38

◆ soap12_namespaces

struct Namespace soap12_namespaces[]
Initial value:
= {
{"SOAP-ENV", "http://www.w3.org/2003/05/soap-envelope", "http://schemas.xmlsoap.org/soap/envelope/", NULL},
{"SOAP-ENC", "http://www.w3.org/2003/05/soap-encoding", "http://schemas.xmlsoap.org/soap/encoding/", NULL},
{"xsi", "http://www.w3.org/2001/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL},
{"xsd", "http://www.w3.org/2001/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL},
{"c14n", "http://www.w3.org/2001/10/xml-exc-c14n#", NULL, NULL},
{"ds", "http://www.w3.org/2000/09/xmldsig#", NULL, NULL},
{"saml1", SOAP_NAMESPACE_OF_saml1, NULL, NULL},
{"saml2", SOAP_NAMESPACE_OF_saml2, NULL, NULL},
{"xenc", "http://www.w3.org/2001/04/xmlenc#", NULL, NULL},
{"wsc", "http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512", "http://schemas.xmlsoap.org/ws/2005/02/sc", NULL},
{"wsse", SOAP_NAMESPACE_OF_wsse, "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", NULL},
{"chan", "http://schemas.microsoft.com/ws/2005/02/duplex", NULL, NULL},
{"wsa5", "http://www.w3.org/2005/08/addressing", "http://schemas.xmlsoap.org/ws/2004/08/addressing", NULL},
{"wsp", "http://schemas.xmlsoap.org/ws/2004/09/policy", NULL, NULL},
{"wsu", SOAP_NAMESPACE_OF_wsu, NULL, NULL},
{"wst", SOAP_NAMESPACE_OF_wst, "http://schemas.xmlsoap.org/ws/2005/02/trust", NULL},
{NULL, NULL, NULL, NULL}
}

◆ soap_wst_rst_action

const char* soap_wst_rst_action = SOAP_NAMESPACE_OF_wst "/RST/Issue"

◆ soap_wst_rstc_action

const char* soap_wst_rstc_action = SOAP_NAMESPACE_OF_wst "/RSTC/Issue"

◆ soap_wst_rstr_action

const char* soap_wst_rstr_action = SOAP_NAMESPACE_OF_wst "/RSTR/Issue"

◆ soap_wst_rstrc_action

const char* soap_wst_rstrc_action = SOAP_NAMESPACE_OF_wst "/RSTRC/IssueFinal"