#include <time.h>
Go to the source code of this file.
Defines | |
#define | GLITE_DELEGATION_SD_TYPE "org.glite.Delegation" |
#define | GLITE_DELEGATION_SD_ENV "GLITE_SD_DELEGATION_TYPE" |
Typedefs | |
typedef _glite_delegation_ctx | glite_delegation_ctx |
Functions | |
glite_delegation_ctx * | glite_delegation_new (const char *endpoint) |
Allocates a new delegation context. | |
void | glite_delegation_free (glite_delegation_ctx *ctx) |
Destroys a fireman context. | |
const char * | glite_delegation_get_endpoint (glite_delegation_ctx *ctx) |
Get the current endpoint. | |
char * | glite_delegation_get_error (glite_delegation_ctx *ctx) |
Gets the error message for the last failed operation. | |
int | glite_delegation_delegate (glite_delegation_ctx *ctx, const char *delegationID, int expiration, int force) |
Delegate a local credential to the remote service. | |
int | glite_delegation_info (glite_delegation_ctx *ctx, const char *delegationID, time_t *expiration) |
Get the expiration time. | |
int | glite_delegation_destroy (glite_delegation_ctx *ctx, const char *delegationID) |
Destroy the delegated credential. | |
char * | glite_delegation_getInterfaceVersion (glite_delegation_ctx *ctx) |
Get service interface version. | |
char * | glite_delegation_getVersion (glite_delegation_ctx *ctx) |
Get service implementation version. | |
char * | glite_delegation_getServiceMetadata (glite_delegation_ctx *ctx, const char *key) |
Get service metadata for a given key. |
#define GLITE_DELEGATION_SD_ENV "GLITE_SD_DELEGATION_TYPE" |
Definition at line 50 of file delegation-simple.h.
#define GLITE_DELEGATION_SD_TYPE "org.glite.Delegation" |
Definition at line 47 of file delegation-simple.h.
typedef struct _glite_delegation_ctx glite_delegation_ctx |
Definition at line 40 of file delegation-simple.h.
int glite_delegation_delegate | ( | glite_delegation_ctx * | ctx, | |
const char * | delegationID, | |||
int | expiration, | |||
int | force | |||
) |
Delegate a local credential to the remote service.
If forced, then it will try to renew an existing delegated credential.
ctx | The global context. | |
delegationID | The id used to identify the delegation process and the resulting delegated credentials in the server. | |
expiration | Desired expritation time in minutes. | |
force | Force the delegation, even if there is a valid credential. |
int glite_delegation_destroy | ( | glite_delegation_ctx * | ctx, | |
const char * | delegationID | |||
) |
Destroy the delegated credential.
ctx | The global context. | |
delegationID | The id used to identify the delegation process and the resulting delegated credentials in the server. |
void glite_delegation_free | ( | glite_delegation_ctx * | ctx | ) |
Destroys a fireman context.
ctx | The global context. |
const char* glite_delegation_get_endpoint | ( | glite_delegation_ctx * | ctx | ) |
Get the current endpoint.
ctx | The global context. |
char* glite_delegation_get_error | ( | glite_delegation_ctx * | ctx | ) |
Gets the error message for the last failed operation.
The returned pointer is valid only till the next call to any of the library's functions with the same context pointer.
ctx | The global context. |
char* glite_delegation_getInterfaceVersion | ( | glite_delegation_ctx * | ctx | ) |
Get service interface version.
The returned string must be freed by the caller.
ctx | The global context. |
char* glite_delegation_getServiceMetadata | ( | glite_delegation_ctx * | ctx, | |
const char * | key | |||
) |
Get service metadata for a given key.
The key must not be NULL. The returned string must be freed by the caller.
ctx | The global context. | |
key | The key that's metadata we are looking for. |
char* glite_delegation_getVersion | ( | glite_delegation_ctx * | ctx | ) |
Get service implementation version.
The returned string must be freed by the caller.
ctx | The global context. |
int glite_delegation_info | ( | glite_delegation_ctx * | ctx, | |
const char * | delegationID, | |||
time_t * | expiration | |||
) |
Get the expiration time.
ctx | The global context. | |
delegationID | The id used to identify the delegation process and the resulting delegated credentials in the server. | |
expiration | Expritation time. |
glite_delegation_ctx* glite_delegation_new | ( | const char * | endpoint | ) |
Allocates a new delegation context.
The context can be used to access only one service.
If the endpoint is not a URL (HTTP, HTTPS or HTTPG), then service discovery is used to locate the real service endpoint. In this case the 'endpoint' parameter is the input of the service discovery.
This mechanism is executed upon the first service specific usage of the context. After that point methods using the same context, from any other interface will return an error.
endpoint | The name of the endpoint. Either an URL or a service name. |