-/* Copyright (c) 2017-2018 Dovecot authors, see the included COPYING file */
#ifndef OAUTH2_H
#define OAUTH2_H
/* GET tokeninfo from this URL, token is appended to URL
http://some.host/path?access_token= */
const char *tokeninfo_url;
- /* POST grant password here, needs user credentials and client_* settings */
+ /* POST grant password here, needs user credentials and client_*
+ settings */
const char *grant_url;
/* GET more information from this URL, uses Bearer authentication */
const char *introspection_url;
const char *password,
oauth2_request_callback_t *callback,
void *context);
-#define oauth2_passwd_grant_start(set, input, username, password, callback, context) \
- oauth2_passwd_grant_start(set, input - \
- CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
+#define oauth2_passwd_grant_start(set, input, username, password, callback, \
+ context) \
+ oauth2_passwd_grant_start( \
+ set, input - CALLBACK_TYPECHECK( \
+ callback, void(*)(struct oauth2_request_result*, \
+ typeof(context))), \
username, password, \
(oauth2_request_callback_t*)callback, (void*)context);
oauth2_request_callback_t *callback,
void *context);
#define oauth2_token_validation_start(set, input, callback, context) \
- oauth2_token_validation_start(set, input - \
- CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
+ oauth2_token_validation_start( \
+ set, input - CALLBACK_TYPECHECK( \
+ callback, void(*)(struct oauth2_request_result*, \
+ typeof(context))), \
(oauth2_request_callback_t*)callback, (void*)context);
struct oauth2_request*
oauth2_request_callback_t *callback,
void *context);
#define oauth2_introspection_start(set, input, callback, context) \
- oauth2_introspection_start(set, input - \
- CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
+ oauth2_introspection_start( \
+ set, input - CALLBACK_TYPECHECK( \
+ callback, void(*)(struct oauth2_request_result*, \
+ typeof(context))), \
(oauth2_request_callback_t*)callback, (void*)context);
struct oauth2_request *
oauth2_request_callback_t *callback,
void *context);
#define oauth2_refresh_start(set, input, callback, context) \
- oauth2_refresh_start(set, input - \
- CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
+ oauth2_refresh_start( \
+ set, input - CALLBACK_TYPECHECK( \
+ callback, void(*)(struct oauth2_request_result*, \
+ typeof(context))), \
(oauth2_request_callback_t*)callback, (void*)context);
-/* abort without calling callback, use this to cancel the request */
+/* Abort without calling callback, use this to cancel the request */
void oauth2_request_abort(struct oauth2_request **);
int oauth2_try_parse_jwt(const struct oauth2_settings *set,
const char *key_id);
/* Deinitialize validation key cache */
-void oauth2_validation_key_cache_deinit(struct oauth2_validation_key_cache **_cache);
+void oauth2_validation_key_cache_deinit(
+ struct oauth2_validation_key_cache **_cache);
#endif