summaryrefslogtreecommitdiffstats
path: root/lasso/id-ff
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-08-09 10:53:47 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-08-09 10:53:47 +0000
commitf8545308ffb31de6227b7cf10cf1a07dd0d21f22 (patch)
treee3deab1a49cca81d8d525240c7b943f19ecf9eef /lasso/id-ff
parent4287b6402301342e3033f2b49b90ddf219cd638b (diff)
downloadlasso-f8545308ffb31de6227b7cf10cf1a07dd0d21f22.tar.gz
lasso-f8545308ffb31de6227b7cf10cf1a07dd0d21f22.tar.xz
lasso-f8545308ffb31de6227b7cf10cf1a07dd0d21f22.zip
Added doc
Diffstat (limited to 'lasso/id-ff')
-rw-r--r--lasso/id-ff/login.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/lasso/id-ff/login.c b/lasso/id-ff/login.c
index 30db8db9..793559eb 100644
--- a/lasso/id-ff/login.c
+++ b/lasso/id-ff/login.c
@@ -46,6 +46,20 @@ struct _LassoLoginPrivate
/* functions */
/*****************************************************************************/
+/**
+ * lasso_login_get_assertion_nameIdentifier:
+ * @assertion: an assertion
+ * @err: return location for an allocated GError, or NULL to ignore errors
+ *
+ * An assertion may contain 2 NameIdentifier elements (one called NameIdentifier
+ * and the other called IDPProvidedNameIdentifier).
+ * If contents of the 2 name identifiers are equal then returns one of both
+ * else returns the NameIdentifier content.
+ * If both contents are NULL or NameIdentifier elements are missing then
+ * returns NULL.
+ *
+ * Return value: a string or NULL
+ **/
static gchar*
lasso_login_get_assertion_nameIdentifier(LassoNode *assertion,
GError **err)
@@ -76,6 +90,20 @@ lasso_login_get_assertion_nameIdentifier(LassoNode *assertion,
}
}
+/**
+ * lasso_login_add_response_assertion:
+ * @login: a Login
+ * @federation: a Federation
+ * @authenticationMethod: the authentication method
+ * @reauthenticateOnOrAfter: the reauthenticate on or after time
+ *
+ * Adds an assertion into the samlp:Response.
+ * Assertion is also stored in login->session. If login->session
+ * is NULL, a new session is build before.
+ * The NameIdentifier of the assertion is stored into login->nameIdentifier.
+ *
+ * Return value: 0 on success and a negative value otherwise.
+ **/
static gint
lasso_login_add_response_assertion(LassoLogin *login,
LassoFederation *federation,
@@ -1046,6 +1074,8 @@ lasso_login_new(LassoServer *server)
{
LassoLogin *login;
+ g_return_val_if_fail(LASSO_IS_SERVER(server), NULL);
+
login = LASSO_LOGIN(g_object_new(LASSO_TYPE_LOGIN,
"server", lasso_server_copy(server),
NULL));