db-oauth2.h revision b928b757e77cf5d791fdf54b87e308b39e87071c
#ifndef DB_OAUTH2_H
#define DB_OAUTH2_H 1
struct db_oauth2;
struct oauth2_request;
struct db_oauth2_request;
enum passdb_result result,
struct db_oauth2_request *request,
const char *error,
void *context);
struct db_oauth2_request {
struct oauth2_request *req;
/* username to match */
const char *username;
/* token to use */
const char *token;
struct auth_request *auth_request;
struct auth_fields *fields;
void *context;
};
void db_oauth2_ref(struct db_oauth2 *);
void db_oauth2_unref(struct db_oauth2 **);
void db_oauth2_lookup(struct db_oauth2 *db, struct db_oauth2_request *req, const char *token, struct auth_request *request, db_oauth2_lookup_callback_t *callback, void *context);
CALLBACK_TYPECHECK(callback, void(*)(struct db_oauth2*, enum passdb_result, struct db_oauth2_request *req, const char*, typeof(context))), \
#endif