![]() |
![]() |
![]() |
Lasso Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
LassoSession; LassoSession* lasso_session_new (void); LassoSession* lasso_session_new_from_dump (const gchar *dump); gchar* lasso_session_dump (LassoSession *session); void lasso_session_destroy (LassoSession *session); GList* lasso_session_get_assertions (LassoSession *session, const char *provider_id); LassoNode* lasso_session_get_assertion (LassoSession *session, const gchar *providerID); lasso_error_t lasso_session_remove_assertion (LassoSession *session, const gchar *providerID); lasso_error_t lasso_session_add_assertion (LassoSession *session, const char *providerID, LassoNode *assertion); gchar* lasso_session_get_provider_index (LassoSession *session, gint index); gboolean lasso_session_is_empty (LassoSession *session);
typedef struct { LassoNode parent; /* Can actually contain LassoSamlAssertion or LassoSaml2Assertion */ GHashTable *assertions; /* of LassoNode */ gboolean is_dirty; } LassoSession;
LassoSession stores the assertions received or emitted during the current session. It stores state for using profiles like LassoLogin or LassoLogout.
LassoNode |
|
GHashTable * |
(element-type string LassoNode): a hashtable of LassoSamlAssertion or LassoSaml2Assertion, indexed by provider ids, |
gboolean |
whether this session object has been modified since its creation. |
LassoSession* lasso_session_new (void);
Creates a new LassoSession.
Returns : |
a newly created LassoSession |
LassoSession* lasso_session_new_from_dump (const gchar *dump);
Restores the dump
to a new LassoSession.
|
XML server dump |
Returns : |
a newly created LassoSession; or NULL if an error occured |
gchar* lasso_session_dump (LassoSession *session);
Dumps session
content to an XML string.
|
a LassoSession |
Returns : |
the dump string. It must be freed by the caller.. transfer full. |
void lasso_session_destroy (LassoSession *session);
Destroys a session.
|
a LassoSession |
GList* lasso_session_get_assertions (LassoSession *session, const char *provider_id);
Gets the assertions for the given provider_id
.
|
a LassoSession |
|
the provider ID |
Returns : |
a list of LassoSamlAssertion.. allow-none. transfer container. element-type LassoNode. |
LassoNode* lasso_session_get_assertion (LassoSession *session, const gchar *providerID);
Gets the assertion for the given providerID
.
|
a LassoSession |
|
the provider ID |
Returns : |
transfer none)(allow-none. transfer none. allow-none none. |
lasso_error_t lasso_session_remove_assertion (LassoSession *session, const gchar *providerID);
Removes assertion for providerID
from session
.
|
a LassoSession |
|
the provider ID |
Returns : |
0 on success; or a negative value otherwise. |
lasso_error_t lasso_session_add_assertion (LassoSession *session, const char *providerID, LassoNode *assertion);
Adds assertion
to the principal session. This function also
add the assertion to the index by assertionID.
|
a LassoSession |
|
the provider ID |
|
the assertion |
Returns : |
0 on success; or a negative value otherwise. |
gchar* lasso_session_get_provider_index (LassoSession *session, gint index);
Looks up and returns the nth provider id.
|
a LassoSession |
|
index of requested provider |
Returns : |
transfer full)(allow-none. transfer full. allow-none full. |
gboolean lasso_session_is_empty (LassoSession *session);
Returns TRUE
if session is empty.
|
a LassoSession |
Returns : |
TRUE if empty
|