HTTP authentication. More...
Go to the source code of this file.
Data Structures | |
struct | HttpWwwAuthenticateHeader |
WWW-Authenticate header field. More... | |
Macros | |
#define | HTTP_CLIENT_MAX_HASH_DIGEST_SIZE 32 |
#define | HTTP_CLIENT_MAX_RESPONSE_LEN 64 |
Functions | |
void | httpClientInitAuthParams (HttpClientAuthParams *authParams) |
Initialize HTTP authentication parameters. More... | |
error_t | httpClientFormatAuthorizationField (HttpClientContext *context) |
Format Authorization header field. More... | |
error_t | httpClientParseWwwAuthenticateField (HttpClientContext *context, const char_t *value) |
Parse WWW-Authenticate header field. More... | |
void | httpClientParseQopParam (const HttpParam *param, HttpWwwAuthenticateHeader *authHeader) |
Parse qop parameter. More... | |
void | httpClientParseAlgorithmParam (const HttpParam *param, HttpWwwAuthenticateHeader *authHeader) |
Parse algorithm parameter. More... | |
error_t | httpClientComputeDigest (HttpClientAuthParams *authParams, const char_t *method, size_t methodLen, const char_t *uri, size_t uriLen, char_t *response) |
Digest operation. More... | |
Detailed Description
HTTP authentication.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file http_client_auth.h.
Macro Definition Documentation
◆ HTTP_CLIENT_MAX_HASH_DIGEST_SIZE
#define HTTP_CLIENT_MAX_HASH_DIGEST_SIZE 32 |
Definition at line 40 of file http_client_auth.h.
◆ HTTP_CLIENT_MAX_RESPONSE_LEN
#define HTTP_CLIENT_MAX_RESPONSE_LEN 64 |
Definition at line 49 of file http_client_auth.h.
Function Documentation
◆ httpClientComputeDigest()
error_t httpClientComputeDigest | ( | HttpClientAuthParams * | authParams, |
const char_t * | method, | ||
size_t | methodLen, | ||
const char_t * | uri, | ||
size_t | uriLen, | ||
char_t * | response | ||
) |
Digest operation.
- Parameters
-
[in] authParams HTTP authentication parameters [in] method Pointer to the HTTP method [in] methodLen Length of the HTTP method [in] uri Pointer to the URI [in] uriLen Length of the URI [out] response Pointer to the resulting digest
- Returns
- Error code
Definition at line 594 of file http_client_auth.c.
◆ httpClientFormatAuthorizationField()
error_t httpClientFormatAuthorizationField | ( | HttpClientContext * | context | ) |
Format Authorization header field.
- Parameters
-
[in] context Pointer to the HTTP client context
- Returns
- Error code
Definition at line 92 of file http_client_auth.c.
◆ httpClientInitAuthParams()
void httpClientInitAuthParams | ( | HttpClientAuthParams * | authParams | ) |
Initialize HTTP authentication parameters.
- Parameters
-
[in] authParams HTTP authentication parameters
Definition at line 64 of file http_client_auth.c.
◆ httpClientParseAlgorithmParam()
void httpClientParseAlgorithmParam | ( | const HttpParam * | param, |
HttpWwwAuthenticateHeader * | authHeader | ||
) |
Parse algorithm parameter.
- Parameters
-
[in] param Pointer to the algorithm parameter [in,out] authHeader Pointer to the WWW-Authenticate header field
Definition at line 542 of file http_client_auth.c.
◆ httpClientParseQopParam()
void httpClientParseQopParam | ( | const HttpParam * | param, |
HttpWwwAuthenticateHeader * | authHeader | ||
) |
Parse qop parameter.
- Parameters
-
[in] param Pointer to the algorithm parameter [in,out] authHeader Pointer to the WWW-Authenticate header field
Definition at line 494 of file http_client_auth.c.
◆ httpClientParseWwwAuthenticateField()
error_t httpClientParseWwwAuthenticateField | ( | HttpClientContext * | context, |
const char_t * | value | ||
) |
Parse WWW-Authenticate header field.
- Parameters
-
[in] context Pointer to the HTTP client context [in] value NULL-terminated string that contains the value of header field
- Returns
- Error code
Definition at line 289 of file http_client_auth.c.