| Reference Manual for CouchDB GLib Bindings | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
CouchdbCredentials; CouchdbCredentialsClass; enum CouchdbCredentialsType; CouchdbCredentials * couchdb_credentials_new_with_oauth (const gchar *consumer_key,const gchar *consumer_secret,const gchar *token_key,const gchar *token_secret); CouchdbCredentials * couchdb_credentials_new_with_username_and_password (const gchar *username,const gchar *password); CouchdbCredentialsType couchdb_credentials_get_auth_type (CouchdbCredentials *credentials); #define COUCHDB_CREDENTIALS_ITEM_OAUTH_CONSUMER_KEY #define COUCHDB_CREDENTIALS_ITEM_OAUTH_CONSUMER_SECRET #define COUCHDB_CREDENTIALS_ITEM_OAUTH_TOKEN_KEY #define COUCHDB_CREDENTIALS_ITEM_OAUTH_TOKEN_SECRET #define COUCHDB_CREDENTIALS_ITEM_USERNAME #define COUCHDB_CREDENTIALS_ITEM_PASSWORD const gchar * couchdb_credentials_get_item (CouchdbCredentials *credentials,const gchar *item); void couchdb_credentials_set_item (CouchdbCredentials *credentials,const gchar *item,const gchar *value); CouchdbCredentialsPrivate;
typedef enum {
COUCHDB_CREDENTIALS_TYPE_UNKNOWN = -1,
COUCHDB_CREDENTIALS_TYPE_OAUTH,
COUCHDB_CREDENTIALS_TYPE_USERNAME_AND_PASSWORD
} CouchdbCredentialsType;
CouchdbCredentials * couchdb_credentials_new_with_oauth (const gchar *consumer_key,const gchar *consumer_secret,const gchar *token_key,const gchar *token_secret);
Create a new CouchdbCredentials object to be used for OAuth authentication.
|
OAuth consumer key |
|
OAuth consumer secret |
|
OAuth token key |
|
OAuth token secret |
Returns : |
A CouchdbCredentials object. |
CouchdbCredentials * couchdb_credentials_new_with_username_and_password (const gchar *username,const gchar *password);
Create a new CouchdbCredentials object to be used for username and password based HTTP authentication scheme such as Basic or Digest.
Authentication is delegated to LibSoup.
|
HTTP Authentication username |
|
HTTP Authentication password |
Returns : |
A CouchdbCredentials object. |
CouchdbCredentialsType couchdb_credentials_get_auth_type
(CouchdbCredentials *credentials);
Retrieve the type of authentication defined for the given CouchdbCredentials object.
|
A CouchdbCredentials object |
Returns : |
A CouchdbCredentialsType specifying the type of authentication. |
#define COUCHDB_CREDENTIALS_ITEM_OAUTH_CONSUMER_SECRET
const gchar * couchdb_credentials_get_item (CouchdbCredentials *credentials,const gchar *item);
Get the value associated with one authentication item on the given CouchdbCredentials object. The valid values are the COUCHDB_CREDENTIALS_ITEM_* values defined in couchdb-credentials.h.
|
A CouchdbCredentials object |
|
Name of the item to retrieve |
Returns : |
The value associated with the given item, or NULL if not found. |
void couchdb_credentials_set_item (CouchdbCredentials *credentials,const gchar *item,const gchar *value);
Set the value associated with one authentication item on the given CouchdbCredentials object. The valid values are the COUCHDB_CREDENTIALS_ITEM_* values defined in couchdb-credentials.h.
|
A CouchdbCredentials object |
|
Name of the item to set the value of value: Value of the item |