~ubuntu-branches/ubuntu/hardy/lasso/hardy

« back to all changes in this revision

Viewing changes to lasso/xml/saml-2.0/samlp2_authn_request.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2007-07-31 21:35:26 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070731213526-oc6jw5mprcd5tjyy
Tags: 2.0.0-1ubuntu1
* Merge from debian unstable. Remaining changes:
  + debian/control:
    - Modify Maintainer value to match DebianMaintainerField spec.
* debian/rules:
  + Add CC=gcc-4.2 to the configure call else configure won't find jni.h
    from libgcj8-dev.
* configure{,.ac}:
  + Add missing quotes around the value for PHP[45]_LIBS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 $ 
2
2
 *
3
3
 * Lasso - A free implementation of the Liberty Alliance specifications.
4
4
 *
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;
92
94
 
93
95
        deflated_message = lasso_node_build_deflated_query(node);
 
96
        if (deflated_message == NULL) {
 
97
                return NULL;
 
98
        }
94
99
        ret = g_strdup_printf("SAMLRequest=%s", deflated_message);
95
100
        /* XXX: must support RelayState (which profiles?) */
96
101
        g_free(deflated_message);
103
108
{
104
109
        gboolean rc;
105
110
        char *relay_state = NULL;
 
111
        LassoSamlp2AuthnRequest *request = LASSO_SAMLP2_AUTHN_REQUEST(node);
 
112
 
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;
109
116
        }
110
117
        return rc;
111
118
}
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;
133
141
}
134
142
 
135
143
static void