|
Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
A datatype to store user credentials. More...
#include <user_details.h>
Public Member Functions | |
| GRASSROOTS_USERS_API User * | AllocateUser (bson_oid_t *id_p, const char *email_s, const char *forename_s, const char *surname_s, const char *org_s, const char *orcid_s) |
| Allocate a User with the given details. More... | |
| GRASSROOTS_USERS_API void | FreeUser (User *user_p) |
| Free a User. More... | |
| GRASSROOTS_USERS_API json_t * | GetUserAsJSON (const User *user_p, const ViewFormat vf) |
| Get the json for a User. More... | |
| GRASSROOTS_USERS_API User * | GetUserFromJSON (const json_t *user_json_p) |
| Get a User from a json representation. More... | |
| GRASSROOTS_USERS_API User * | GetUserFromNamedJSON (const json_t *json_p, const char *user_key_s) |
| Get a User from a json representation which is the named child object of the given json. More... | |
| GRASSROOTS_USERS_API bool | AddUserToJSON (const User *user_p, json_t *json_p, const char *const user_key_s, const ViewFormat vf) |
| Add a compound User json to another piece of json. More... | |
| GRASSROOTS_USERS_API char * | GetFullUsername (const User *user_p) |
| Get the full name of a a User. More... | |
| GRASSROOTS_USERS_API void | FreeFullUsername (char *name_s) |
| Free a username that was previously generated by a call to GetFullUsername(). More... | |
Data Fields | |
| bson_oid_t * | us_id_p |
| char * | us_email_s |
| The user's email address. More... | |
| char * | us_surname_s |
| The user's surname(s) More... | |
| char * | us_forename_s |
| The user's forename(s) More... | |
| char * | us_org_s |
| The organisation that the user is associated with. More... | |
| char * | us_orcid_s |
| The user's orcid. More... | |
A datatype to store user credentials.
| GRASSROOTS_USERS_API User * AllocateUser | ( | bson_oid_t * | id_p, |
| const char * | email_s, | ||
| const char * | forename_s, | ||
| const char * | surname_s, | ||
| const char * | org_s, | ||
| const char * | orcid_s | ||
| ) |
Allocate a User with the given details.
| email_s | The email address of the user. This is required. |
| forename_s | The first name of this user. This is required. |
| forename_s | The last name of this user. This is required. |
| org_s | The organisation that this User belongs to. This can be NULL. |
| orcid_s | The ORCID for this User. This can be NULL. |
NULL upon error. | GRASSROOTS_USERS_API void FreeUser | ( | User * | user_p | ) |
| GRASSROOTS_USERS_API json_t * GetUserAsJSON | ( | const User * | user_p, |
| const ViewFormat | vf | ||
| ) |
| GRASSROOTS_USERS_API User * GetUserFromJSON | ( | const json_t * | user_json_p | ) |
| GRASSROOTS_USERS_API User * GetUserFromNamedJSON | ( | const json_t * | json_p, |
| const char * | user_key_s | ||
| ) |
| GRASSROOTS_USERS_API bool AddUserToJSON | ( | const User * | user_p, |
| json_t * | json_p, | ||
| const char *const | user_key_s, | ||
| const ViewFormat | vf | ||
| ) |
| GRASSROOTS_USERS_API char * GetFullUsername | ( | const User * | user_p | ) |
Get the full name of a a User.
| user_p | The User to get the name for |
NULL upon error. This should be freed using FreeFullUsername() | GRASSROOTS_USERS_API void FreeFullUsername | ( | char * | name_s | ) |
Free a username that was previously generated by a call to GetFullUsername().
| name_s | The name to free |
| bson_oid_t* us_id_p |
| char* us_email_s |
The user's email address.
| char* us_surname_s |
The user's surname(s)
| char* us_forename_s |
The user's forename(s)
| char* us_org_s |
The organisation that the user is associated with.
This can be NULL
| char* us_orcid_s |
The user's orcid.