![]() |
![]() |
![]() |
Lasso Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <lasso/lasso.h> LassoServer; LassoServer* lasso_server_new (constgchar *metadata, constgchar *private_key, constgchar *private_key_password, constgchar *certificate); LassoServer* lasso_server_new_from_dump (constgchar *dump);gint lasso_server_add_provider (LassoServer *server, LassoProviderRole role, constgchar *metadata, constgchar *public_key, constgchar *ca_cert_chain);gint lasso_server_add_service (LassoServer *server, LassoNode *service);void lasso_server_destroy (LassoServer *server);gchar * lasso_server_dump (LassoServer *server); LassoProvider* lasso_server_get_provider (LassoServer *server, constgchar *providerID);LassoDiscoServiceInstance * lasso_server_get_service (LassoServer *server, constgchar *serviceType);
It holds the data about a provider, other providers it knows, which certificates to use, etc.
typedef struct { GHashTable *providers; /* of LassoProvider */ /* Can actually contain LassoDataService or LassoIdWsf2DataService or any subclass */ GHashTable *services; /* of LassoDataService */ gchar *private_key; gchar *private_key_password; gchar *certificate; LassoSignatureMethod signature_method; } LassoServer;
LassoServer* lasso_server_new (constgchar *metadata, constgchar *private_key, constgchar *private_key_password, constgchar *certificate);
Creates a new LassoServer.
|
path to the provider metadata file or NULL, for a LECP server |
|
path to the the server private key file or NULL |
|
password to private key if it is encrypted, or NULL |
|
path to the server certificate file, or NULL |
Returns : |
a newly created LassoServer object; or NULL if an error occured |
LassoServer* lasso_server_new_from_dump (constgchar *dump);
Restores the dump
to a new LassoServer.
|
XML server dump |
Returns : |
a newly created LassoServer; or NULL if an error occured |
gint lasso_server_add_provider (LassoServer *server, LassoProviderRole role, constgchar *metadata, constgchar *public_key, constgchar *ca_cert_chain);
Creates a new LassoProvider and makes it known to the server
|
a LassoServer |
|
provider role, identity provider or service provider |
|
path to the provider metadata file |
|
provider public key file (may be a certificate) or NULL |
|
provider CA certificate chain file or NULL |
Returns : |
0 on success; a negative value if an error occured. |
gint lasso_server_add_service (LassoServer *server, LassoNode *service);
Add a service to the registry of service of this LassoServer object.
|
a LassoServer |
|
a LassoNode object implementing representing a service endpoint. |
Returns : |
0 on success; a negative value if an error occured. |
void lasso_server_destroy (LassoServer *server);
Destroys a server.
|
a LassoServer |
gchar * lasso_server_dump (LassoServer *server);
Dumps server
content to an XML string.
|
a LassoServer |
Returns : |
the dump string. It must be freed by the caller. |
LassoProvider* lasso_server_get_provider (LassoServer *server, constgchar *providerID);
Looks up for a LassoProvider whose ID is providerID
and returns it.
|
a LassoServer |
|
the provider ID |
Returns : |
the LassoProvider, NULL if it was not found. The LassoProvider is owned by Lasso and should not be freed. |
LassoDiscoServiceInstance * lasso_server_get_service (LassoServer *server, constgchar *serviceType);
...
|
a LassoServer |
|
|
Returns : |
the |