* @section CAPI_OAUTH2_MODULE_OVERVIEW Overview
* The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf.
*
- * @if WEARABLE
* @section CAPI_OAUTH2_MODULE_FEATURE Related Features
* This API is related with the following features:
+ * - http://tizen.org/feature/oauth2
* - http://tizen.org/feature/network.internet
*
* It is recommended to design feature related codes in your application for reliability.\n
*
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
*
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- * @endif
- *
-*/
+ * More details on featuring your application can be found from <a href="https://developer.tizen.org/development/tizen-studio/native-tools/configuring-your-app/manifest-text-editor#feature"><b>Feature List</b>.</a>a>
+ */
#endif /* __OAUTH2_DOC_H__ */
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_error_get_code(oauth2_error_h handle, int *server_error_code, int *platform_error_code);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_error_get_description(oauth2_error_h handle, char **description);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_error_get_uri(oauth2_error_h handle, char **uri);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_error_get_custom_data(oauth2_error_h handle, const char *custom_key, char **custom_value);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*
* @see oauth2_manager_destroy()
*/
* otherwise a negative error value
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_manager_destroy(oauth2_manager_h handle);
* @param[in] handle The auth2 manager handle.
* @retval false No pending request
* @retval true There is pending request.
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API bool oauth2_manager_is_request_in_progress(oauth2_manager_h handle);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_create(oauth2_request_h *handle);
* otherwise a negative error value
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_destroy(oauth2_request_h handle);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_auth_end_point_url(oauth2_request_h handle, const char *url);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_token_end_point_url(oauth2_request_h handle, const char *url);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_redirection_url(oauth2_request_h handle, const char *url);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_refresh_token_url(oauth2_request_h handle, const char *url);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_refresh_token(oauth2_request_h handle, char *refresh_token);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_response_type(oauth2_request_h handle, oauth2_response_type_e response_type);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_client_id(oauth2_request_h handle, const char *client_id);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_client_secret(oauth2_request_h handle, const char *client_secret);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_client_authentication_type(oauth2_request_h handle, oauth2_client_authentication_type_e client_auth_type);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_scope(oauth2_request_h handle, const char *scope);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_state(oauth2_request_h handle, const char *state);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_grant_type(oauth2_request_h handle, oauth2_grant_type_e grant_type);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*
* @see oauth2_response_get_authorization_code()
*/
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_user_name(oauth2_request_h handle, const char *user_name);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_set_password(oauth2_request_h handle, const char *password);
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*
* @see oauth2_request_get_custom_data()
*/
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_auth_end_point_url(oauth2_request_h handle, char **url);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_token_end_point_url(oauth2_request_h handle, char **url);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_redirection_url(oauth2_request_h handle, char **url);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_refresh_token_url(oauth2_request_h handle, char **url);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_refresh_token(oauth2_request_h handle, char **refresh_token);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_response_type(oauth2_request_h handle, oauth2_response_type_e *response_type);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_client_id(oauth2_request_h handle, char **client_id);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_client_secret(oauth2_request_h handle, char **client_secret);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_scope(oauth2_request_h handle, char **scope);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_state(oauth2_request_h handle, char **state);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_grant_type(oauth2_request_h handle, oauth2_grant_type_e *grant_type);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_authorization_code(oauth2_request_h handle, char **code);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_user_name(oauth2_request_h handle, char **user_name);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_password(oauth2_request_h handle, char **password);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_request_get_custom_data(oauth2_request_h handle, const char *custom_key, char **custom_value);
* otherwise a negative error value
* @retval #OAUTH2_ERROR_NONE Successful
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_destroy(oauth2_response_h handle);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*
* @see oauth2_request_set_authorization_code()
*/
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_get_state(oauth2_response_h handle, char **state);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_get_access_token(oauth2_response_h handle, char **access_token);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_get_token_type(oauth2_response_h handle, char **token_type);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_get_expires_in(oauth2_response_h handle, long long *expires_in);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_get_refresh_token(oauth2_response_h handle, char **refresh_token);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_get_scope(oauth2_response_h handle, char **scope);
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*
* @see oauth2_error_h
*/
* @retval #OAUTH2_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #OAUTH2_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #OAUTH2_ERROR_VALUE_NOT_FOUND Value not found
+ * @retval #OAUTH2_ERROR_NOT_SUPPORTED Not supported
*/
OAUTH2_API int oauth2_response_get_custom_data(oauth2_response_h handle, const char *custom_key, char **custom_value);
int oauth2_error_get_code(oauth2_error_h handle, int *server_error_code,
int *platform_error_code)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
OAUTH2_API
int oauth2_error_get_description(oauth2_error_h handle, char **description)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
OAUTH2_API
int oauth2_error_get_uri(oauth2_error_h handle, char **uri)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
int oauth2_error_get_custom_data(oauth2_error_h handle, const char *custom_key,
char **custom_value)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
#include "oauth2_util.h"
#include "oauth2_private.h"
-#define NETWORK_FEATURE "tizen.org/feature/network.internet"
+#define OAUTH2_FEATURE "tizen.org/feature/oauth2"
#define INTERNET_PRIVILEGE "http://tizen.org/privilege/internet"
#define SMACK_LABEL_LEN 255
{
OAUTH2_LOG_I("oauth2_manager_create");
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"Null Input");
OAUTH2_API int
oauth2_manager_destroy(oauth2_manager_h handle)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"Null Input");
}
/*LCOV_EXCL_START*/
-static bool
+bool
__is_feature_supported(void)
{
bool supported = FALSE;
- int ret = system_info_get_platform_bool(NETWORK_FEATURE, &supported);
- OAUTH2_RETURN_VAL(ret == SYSTEM_INFO_ERROR_NONE, {}, false, "network feature support check failed");
+ int ret = system_info_get_platform_bool(OAUTH2_FEATURE, &supported);
+ OAUTH2_RETURN_VAL(ret == SYSTEM_INFO_ERROR_NONE, {}, false, "oauth2 feature support check failed");
return supported;
}
oauth2_manager_request_token(oauth2_manager_h handle, oauth2_request_h request,
oauth2_token_cb callback, void *user_data)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(callback, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"callback is Null");
OAUTH2_RETURN_VAL(request, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"request is Null");
/*LCOV_EXCL_START*/
- OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
- "network feature not supported");
OAUTH2_RETURN_VAL(__check_permission(), {}, OAUTH2_ERROR_PERMISSION_DENIED,
"permission denied, no internet privilege");
oauth2_request_h request, oauth2_auth_grant_cb callback,
void *user_data)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(callback, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"callback is Null");
OAUTH2_RETURN_VAL(request, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"request is Null");
- /*LCOV_EXCL_START*/
- OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
- "network feature not supported");
+ /*LCOV_EXCL_START*/
OAUTH2_RETURN_VAL(__check_permission(), {}, OAUTH2_ERROR_PERMISSION_DENIED,
"permission denied, no internet privilege");
oauth2_request_h request, oauth2_access_token_cb callback,
void *user_data)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(callback, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"callback is Null");
OAUTH2_RETURN_VAL(request, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"request is Null");
- /*LCOV_EXCL_START*/
- OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
- "network feature not supported");
+ /*LCOV_EXCL_START*/
OAUTH2_RETURN_VAL(__check_permission(), {}, OAUTH2_ERROR_PERMISSION_DENIED,
"permission denied, no internet privilege");
oauth2_request_h request, oauth2_refresh_token_cb callback,
void *user_data)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(callback, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"callback is Null");
OAUTH2_RETURN_VAL(request, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"request is Null");
- /*LCOV_EXCL_START*/
- OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
- "network feature not supported");
+ /*LCOV_EXCL_START*/
OAUTH2_RETURN_VAL(__check_permission(), {}, OAUTH2_ERROR_PERMISSION_DENIED,
"permission denied, no internet privilege");
OAUTH2_API bool
oauth2_manager_is_request_in_progress(oauth2_manager_h handle)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, FALSE, "handle is Null");
/*LCOV_EXCL_START*/
OAUTH2_API int
oauth2_manager_clear_cookies(oauth2_manager_h handle)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"handle is Null");
- /*LCOV_EXCL_START*/
- OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
- "network feature not supported");
+ /*LCOV_EXCL_START*/
OAUTH2_RETURN_VAL(__check_permission(), {}, OAUTH2_ERROR_PERMISSION_DENIED,
"permission denied, no internet privilege");
OAUTH2_API int
oauth2_manager_clear_cache(oauth2_manager_h handle)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"handle is Null");
- /*LCOV_EXCL_START*/
- OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
- "network feature not supported");
+ /*LCOV_EXCL_START*/
OAUTH2_RETURN_VAL(__check_permission(), {}, OAUTH2_ERROR_PERMISSION_DENIED,
"permission denied, no internet privilege");
} oauth2_manager_s;
int _oauth2_response_create(oauth2_response_s **response);
+bool __is_feature_supported(void);
#endif /* OAUTH2_PRIVATE_H_ */
OAUTH2_API int
oauth2_request_create(oauth2_request_h *handle)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_destroy(oauth2_request_h handle)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_auth_end_point_url(oauth2_request_h handle, const char *url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_token_end_point_url(oauth2_request_h handle, const char *url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_redirection_url(oauth2_request_h handle, const char *url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_refresh_token_url(oauth2_request_h handle, const char *url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_refresh_token(oauth2_request_h handle, char *refresh_token)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_s *req_impl = (oauth2_request_s *)handle;
oauth2_request_set_response_type(oauth2_request_h handle,
oauth2_response_type_e response_type)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_client_id(oauth2_request_h handle, const char *client_id)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_set_client_secret(oauth2_request_h handle,
const char *client_secret)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_set_client_authentication_type(oauth2_request_h handle,
oauth2_client_authentication_type_e client_auth_type)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_scope(oauth2_request_h handle, const char *scope)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_set_state(oauth2_request_h handle, const char *state)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_set_grant_type(oauth2_request_h handle,
oauth2_grant_type_e grant_type)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
}
oauth2_request_s *req_impl = (oauth2_request_s *)handle;
- if (!req_impl) {
- OAUTH2_LOG_E("Null Input");
- return OAUTH2_ERROR_INVALID_PARAMETER;
- }
if (!req_impl->request_data) {
OAUTH2_LOG_E("oauth2_request_h must be created first.");
OAUTH2_API int
oauth2_request_set_authorization_code(oauth2_request_h handle, const char *code)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_s *req_impl = (oauth2_request_s *)handle;
- if (!req_impl) {
- OAUTH2_LOG_E("Null Input");
- return OAUTH2_ERROR_INVALID_PARAMETER;
- }
if (!req_impl->request_data) {
OAUTH2_LOG_E("oauth2_request_h must be created first.");
OAUTH2_API int
oauth2_request_set_user_name(oauth2_request_h handle, const char *user_name)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_s *req_impl = (oauth2_request_s *)handle;
- if (!req_impl) {
- OAUTH2_LOG_E("Null Input");
- return OAUTH2_ERROR_INVALID_PARAMETER;
- }
if (!req_impl->request_data) {
OAUTH2_LOG_E("oauth2_request_h must be created first.");
OAUTH2_API int
oauth2_request_set_password(oauth2_request_h handle, const char *password)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_s *req_impl = (oauth2_request_s *)handle;
- if (!req_impl) {
- OAUTH2_LOG_E("Null Input");
- return OAUTH2_ERROR_INVALID_PARAMETER;
- }
if (!req_impl->request_data) {
OAUTH2_LOG_E("oauth2_request_h must be created first.");
oauth2_request_add_custom_data(oauth2_request_h handle, const char *key,
const char *value)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
if (!key || !value) {
OAUTH2_LOG_E("key and value must not be null");
return OAUTH2_ERROR_INVALID_PARAMETER;
"NULL handle");
oauth2_request_s *req_impl = (oauth2_request_s *)handle;
- if (!req_impl) {
- OAUTH2_LOG_E("Null Input");
- return OAUTH2_ERROR_INVALID_PARAMETER;
- }
if (!req_impl->request_data) {
OAUTH2_LOG_E("oauth2_request_h must be created first.");
OAUTH2_API int
oauth2_request_get_auth_end_point_url(oauth2_request_h handle, char **url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_token_end_point_url(oauth2_request_h handle, char **url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_redirection_url(oauth2_request_h handle, char **url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_refresh_token_url(oauth2_request_h handle, char **url)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
int oauth2_request_get_refresh_token(oauth2_request_h handle,
char **refresh_token)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_get_response_type(oauth2_request_h handle,
oauth2_response_type_e *response_type)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_client_id(oauth2_request_h handle, char **client_id)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_client_secret(oauth2_request_h handle, char **client_secret)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_scope(oauth2_request_h handle, char **scope)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_state(oauth2_request_h handle, char **state)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_get_grant_type(oauth2_request_h handle,
oauth2_grant_type_e *grant_type)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_authorization_code(oauth2_request_h handle, char **code)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_user_name(oauth2_request_h handle, char **user_name)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
OAUTH2_API int
oauth2_request_get_password(oauth2_request_h handle, char **password)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_get_custom_data(oauth2_request_h handle, const char *custom_key,
char **custom_value)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
oauth2_request_s *request_data_temp = (oauth2_request_s *)handle;
OAUTH2_API int
oauth2_response_destroy(oauth2_response_h handle)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER, "NULL handle");
/*LCOV_EXCL_START*/
oauth2_response_s *response_temp = (oauth2_response_s *)handle;
OAUTH2_API int
oauth2_response_get_authorization_code(oauth2_response_h handle, char **code)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
OAUTH2_API int
oauth2_response_get_state(oauth2_response_h handle, char **state)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
OAUTH2_API int
oauth2_response_get_access_token(oauth2_response_h handle, char **access_token)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
OAUTH2_API int
oauth2_response_get_token_type(oauth2_response_h handle, char **token_type)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
oauth2_response_get_expires_in(oauth2_response_h handle,
long long int *expires_in)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
oauth2_response_get_refresh_token(oauth2_response_h handle,
char **refresh_token)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
OAUTH2_API int
oauth2_response_get_scope(oauth2_response_h handle, char **scope)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
OAUTH2_API int
oauth2_response_get_error(oauth2_response_h handle, oauth2_error_h *error)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER,
"NULL handle");
/*LCOV_EXCL_START*/
oauth2_response_get_custom_data(oauth2_response_h handle,
const char *custom_key, char **custom_value)
{
+ OAUTH2_RETURN_VAL(__is_feature_supported(), {}, OAUTH2_ERROR_NOT_SUPPORTED,
+ "oauth2 feature not supported");
+
OAUTH2_RETURN_VAL(handle, {}, OAUTH2_ERROR_INVALID_PARAMETER, "NULL handle");
/*LCOV_EXCL_START*/
oauth2_response_s *response_data_temp = (oauth2_response_s *)handle;