Tizen Native API
7.0
|
It manages HTTP Authentication and credential.
Required Header
#include <http.h>
Overview
It manages HTTP Authentication and credential.
Functions | |
int | http_transaction_open_authentication (http_transaction_h http_transaction, http_transaction_h *http_auth_transaction) |
Opens HTTP transaction with authentication information. | |
int | http_transaction_set_credentials (http_transaction_h http_transaction, const char *user_name, const char *password) |
Sets an HTTP credentials. | |
int | http_transaction_get_credentials (http_transaction_h http_transaction, char **user_name, char **password) |
Gets the username & password for the HTTP credential. | |
int | http_transaction_set_http_auth_scheme (http_transaction_h http_transaction, http_auth_scheme_e auth_scheme) |
Sets an HTTP authentication scheme. | |
int | http_transaction_get_http_auth_scheme (http_transaction_h http_transaction, http_auth_scheme_e *auth_scheme) |
Gets the HTTP authentication scheme. | |
int | http_transaction_get_realm (http_transaction_h http_transaction, char **realm) |
Gets the HTTP authentication realm. |
Function Documentation
int http_transaction_get_credentials | ( | http_transaction_h | http_transaction, |
char ** | user_name, | ||
char ** | password | ||
) |
Gets the username & password for the HTTP credential.
- Since :
- 3.0
- Remarks:
- The user_name & password should be freed using free().
- Parameters:
-
[in] http_transaction The HTTP transaction handle [out] user_name The HTTP credential user name [out] password The HTTP credential password
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_INVALID_OPERATION Invalid operation HTTP_ERROR_OUT_OF_MEMORY Out of memory HTTP_ERROR_NOT_SUPPORTED Not Supported
int http_transaction_get_http_auth_scheme | ( | http_transaction_h | http_transaction, |
http_auth_scheme_e * | auth_scheme | ||
) |
Gets the HTTP authentication scheme.
- Since :
- 3.0
- Parameters:
-
[in] http_transaction The HTTP transaction handle [out] auth_scheme The HTTP auth scheme value
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_INVALID_OPERATION Invalid operation HTTP_ERROR_NOT_SUPPORTED Not Supported
int http_transaction_get_realm | ( | http_transaction_h | http_transaction, |
char ** | realm | ||
) |
Gets the HTTP authentication realm.
- Since :
- 3.0
- Remarks:
- The realm should be freed using free().
- Parameters:
-
[in] http_transaction The HTTP transaction handle [out] realm The HTTP authentication realm value
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_INVALID_OPERATION Invalid operation HTTP_ERROR_OUT_OF_MEMORY Out of memory HTTP_ERROR_NOT_SUPPORTED Not Supported
int http_transaction_open_authentication | ( | http_transaction_h | http_transaction, |
http_transaction_h * | http_auth_transaction | ||
) |
Opens HTTP transaction with authentication information.
- Since :
- 3.0
- Remarks:
- The http_auth_transaction should be released using http_transaction_destroy().
- Parameters:
-
[in] http_transaction The HTTP transaction handle [out] http_auth_transaction The HTTP transaction handle
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_INVALID_OPERATION Invalid operation HTTP_ERROR_OUT_OF_MEMORY Out of memory HTTP_ERROR_NOT_SUPPORTED Not Supported
int http_transaction_set_credentials | ( | http_transaction_h | http_transaction, |
const char * | user_name, | ||
const char * | password | ||
) |
Sets an HTTP credentials.
Sets an HTTP authentication scheme such as username and password.
- Since :
- 3.0
- Parameters:
-
[in] http_transaction The HTTP transaction handle [in] user_name The HTTP user name [in] password The HTTP password
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_NOT_SUPPORTED Not Supported
int http_transaction_set_http_auth_scheme | ( | http_transaction_h | http_transaction, |
http_auth_scheme_e | auth_scheme | ||
) |
Sets an HTTP authentication scheme.
Set an HTTP authentication scheme such as BASIC, MD5, NTLM and etc.
- Since :
- 3.0
- Parameters:
-
[in] http_transaction The HTTP transaction handle [in] auth_scheme The HTTP authentication scheme
- Returns:
0
on success, otherwise negative error value
- Return values:
-
HTTP_ERROR_NONE Successful HTTP_ERROR_INVALID_PARAMETER Invalid parameter HTTP_ERROR_NOT_SUPPORTED Not Supported