HTTP authentication for WebSockets. More...
Go to the source code of this file.
Functions | |
error_t | webSocketParseAuthenticateField (WebSocket *webSocket, char_t *value) |
Parse WWW-Authenticate header field. More... | |
size_t | webSocketAddAuthorizationField (WebSocket *webSocket, char_t *output) |
Format Authorization header field. More... | |
void | webSocketConvertArrayToHexString (const uint8_t *input, size_t inputLen, char_t *output) |
Convert byte array to hex string. More... | |
Detailed Description
HTTP authentication for WebSockets.
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 web_socket_auth.h.
Function Documentation
◆ webSocketAddAuthorizationField()
Format Authorization header field.
- Parameters
-
[in] webSocket Handle to a WebSocket [out] output Buffer where to format the header field
- Returns
- Total length of the header field
Definition at line 171 of file web_socket_auth.c.
◆ webSocketConvertArrayToHexString()
void webSocketConvertArrayToHexString | ( | const uint8_t * | input, |
size_t | inputLen, | ||
char_t * | output | ||
) |
Convert byte array to hex string.
- Parameters
-
[in] input Point to the byte array [in] inputLen Length of the byte array [out] output NULL-terminated string resulting from the conversion
Definition at line 314 of file web_socket_auth.c.
◆ webSocketParseAuthenticateField()
Parse WWW-Authenticate header field.
- Parameters
-
[in] webSocket Handle to a WebSocket [in] value NULL-terminated string that contains the value of header field
- Returns
- Error code
Definition at line 55 of file web_socket_auth.c.