1
/* $Id: samlp2_authn_request.c,v 1.2 2005/11/21 18:51:52 fpeters Exp $
1
/* $Id: samlp2_authn_request.c,v 1.6 2006/12/28 14:44:56 fpeters Exp $
3
3
* Lasso - A free implementation of the Liberty Alliance specifications.
71
71
G_STRUCT_OFFSET(LassoSamlp2AuthnRequest, IsPassive) },
72
72
{ "ProtocolBinding", SNIPPET_ATTRIBUTE,
73
73
G_STRUCT_OFFSET(LassoSamlp2AuthnRequest, ProtocolBinding) },
74
{ "AssertionConsumerServiceIndex", SNIPPET_ATTRIBUTE | SNIPPET_INTEGER,
74
{ "AssertionConsumerServiceIndex",
75
SNIPPET_ATTRIBUTE | SNIPPET_INTEGER | SNIPPET_OPTIONAL_NEG,
75
76
G_STRUCT_OFFSET(LassoSamlp2AuthnRequest, AssertionConsumerServiceIndex) },
76
77
{ "AssertionConsumerServiceURL", SNIPPET_ATTRIBUTE,
77
78
G_STRUCT_OFFSET(LassoSamlp2AuthnRequest, AssertionConsumerServiceURL) },
78
{ "AttributeConsumingServiceIndex", SNIPPET_ATTRIBUTE | SNIPPET_INTEGER,
79
{ "AttributeConsumingServiceIndex",
80
SNIPPET_ATTRIBUTE | SNIPPET_INTEGER | SNIPPET_OPTIONAL_NEG,
79
81
G_STRUCT_OFFSET(LassoSamlp2AuthnRequest, AttributeConsumingServiceIndex) },
80
82
{ "ProviderName", SNIPPET_ATTRIBUTE,
81
83
G_STRUCT_OFFSET(LassoSamlp2AuthnRequest, ProviderName) },
91
93
char *ret, *deflated_message;
93
95
deflated_message = lasso_node_build_deflated_query(node);
96
if (deflated_message == NULL) {
94
99
ret = g_strdup_printf("SAMLRequest=%s", deflated_message);
95
100
/* XXX: must support RelayState (which profiles?) */
96
101
g_free(deflated_message);
105
110
char *relay_state = NULL;
111
LassoSamlp2AuthnRequest *request = LASSO_SAMLP2_AUTHN_REQUEST(node);
106
113
rc = lasso_node_init_from_saml2_query_fields(node, query_fields, &relay_state);
107
114
if (rc && relay_state != NULL) {
108
/* XXX: support RelayState? */
115
request->relayState = relay_state;
126
133
node->ForceAuthn = FALSE;
127
134
node->IsPassive = FALSE;
128
135
node->ProtocolBinding = NULL;
129
node->AssertionConsumerServiceIndex = 0;
136
node->AssertionConsumerServiceIndex = -1;
130
137
node->AssertionConsumerServiceURL = NULL;
131
node->AttributeConsumingServiceIndex = 0;
138
node->AttributeConsumingServiceIndex = -1;
132
139
node->ProviderName = NULL;
140
node->relayState = NULL;