233typedef const char *(*lcb_AUTHCALLBACK)(
void *cookie,
const char *host,
const char *port,
const char *bucket);
246 lcb_AUTHCALLBACK usercb, lcb_AUTHCALLBACK passcb),
247 "Use lcbauth_set_callback");
249typedef struct lcbauth_CREDENTIALS_ lcbauth_CREDENTIALS;
260LIBCOUCHBASE_API
lcb_STATUS lcbauth_credentials_username(lcbauth_CREDENTIALS *credentials,
const char *username,
261 size_t username_len);
271LIBCOUCHBASE_API
lcb_STATUS lcbauth_credentials_password(lcbauth_CREDENTIALS *credentials,
const char *password,
272 size_t password_len);
279 LCBAUTH_RESULT_OK = 0,
280 LCBAUTH_RESULT_NOT_AVAILABLE,
293 LCBAUTH_SERVICE_UNSPECIFIED = 0,
294 LCBAUTH_SERVICE_KEY_VALUE,
295 LCBAUTH_SERVICE_QUERY,
296 LCBAUTH_SERVICE_SEARCH,
297 LCBAUTH_SERVICE_ANALYTICS,
298 LCBAUTH_SERVICE_MANAGEMENT,
299 LCBAUTH_SERVICE_EVENTING,
300 LCBAUTH_SERVICE_VIEWS,
310LIBCOUCHBASE_API lcbauth_SERVICE lcbauth_credentials_service(
const lcbauth_CREDENTIALS *credentials);
316 LCBAUTH_REASON_NEW_OPERATION = 0,
317 LCBAUTH_REASON_AUTHENTICATION_FAILURE,
318 LCBAUTH_REASON_AUTHORIZATION_FAILURE,
328LIBCOUCHBASE_API
lcbauth_REASON lcbauth_credentials_reason(
const lcbauth_CREDENTIALS *credentials);
340LIBCOUCHBASE_API
lcb_STATUS lcbauth_credentials_hostname(
const lcbauth_CREDENTIALS *credentials,
const char **hostname,
341 size_t *hostname_len);
353LIBCOUCHBASE_API
lcb_STATUS lcbauth_credentials_port(
const lcbauth_CREDENTIALS *credentials,
const char **port,
366LIBCOUCHBASE_API
lcb_STATUS lcbauth_credentials_bucket(
const lcbauth_CREDENTIALS *credentials,
const char **bucket,
377LIBCOUCHBASE_API
lcb_STATUS lcbauth_credentials_cookie(
const lcbauth_CREDENTIALS *credentials,
void **cookie);
388 void (*callback)(lcbauth_CREDENTIALS *));
412 LCBAUTH_MODE_DYNAMIC = 2
Opaque pointer containing credentials for the library.
lcbauth_MODE
Definition auth.h:390
lcb_STATUS lcbauth_add_pass(lcb_AUTHENTICATOR *auth, const char *user, const char *pass, int flags)
void lcbauth_unref(lcb_AUTHENTICATOR *auth)
lcbauth_ADDPASSFLAGS
Flags to use when adding a new set of credentials to lcbauth_add_pass.
Definition auth.h:148
lcb_AUTHENTICATOR * lcbauth_new(void)
lcbauth_RESULT
Result could be used to notify the library that credentials cannot be resolved (e....
Definition auth.h:278
lcb_AUTHENTICATOR * lcbauth_clone(const lcb_AUTHENTICATOR *src)
lcbauth_REASON
Reason, why the library requests credentials.
Definition auth.h:315
lcb_STATUS lcbauth_set_mode(lcb_AUTHENTICATOR *src, lcbauth_MODE mode)
void lcbauth_ref(lcb_AUTHENTICATOR *auth)
@ LCBAUTH_MODE_RBAC
Use role-based access control.
Definition auth.h:404
@ LCBAUTH_MODE_CLASSIC
Use "bucket-specific" credentials when authenticating.
Definition auth.h:395
@ LCBAUTH_F_CLUSTER
User/Password is administrative; for cluster.
Definition auth.h:150
@ LCBAUTH_F_BUCKET
User is bucket name.
Definition auth.h:157
lcb_STATUS
Error codes returned by the library.
Definition error.h:213