web_socket_auth.h File Reference

HTTP authentication for WebSockets. More...

#include "core/net.h"
#include "web_socket/web_socket.h"

Go to the source code of this file.


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.


SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2020 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.

Oryx Embedded SARL (www.oryx-embedded.com)

Definition in file web_socket_auth.h.

Function Documentation

◆ webSocketAddAuthorizationField()

size_t webSocketAddAuthorizationField ( WebSocket webSocket,
char_t output 

Format Authorization header field.

[in]webSocketHandle to a WebSocket
[out]outputBuffer where to format the header field
Total length of the header field

Definition at line 167 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.

[in]inputPoint to the byte array
[in]inputLenLength of the byte array
[out]outputNULL-terminated string resulting from the conversion

Definition at line 310 of file web_socket_auth.c.

◆ webSocketParseAuthenticateField()

error_t webSocketParseAuthenticateField ( WebSocket webSocket,
char_t value 

Parse WWW-Authenticate header field.

[in]webSocketHandle to a WebSocket
[in]valueNULL-terminated string that contains the value of header field
Error code

Definition at line 55 of file web_socket_auth.c.