MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / verifyToken

Method verifyToken

app/src/API/Server.cpp:574–577  ·  view source on GitHub ↗

* @brief Constant-time check of a client-provided token against the configured one. */

Source from the content-addressed store, hash-verified

572 * @brief Constant-time check of a client-provided token against the configured one.
573 */
574bool API::Server::verifyToken(const QByteArray& provided) const
575{
576 return !m_authToken.isEmpty() && constantTimeEquals(provided, m_authToken.toUtf8());
577}
578
579/**
580 * @brief Gates API-originated device writes behind a one-time user consent prompt. Headless

Callers 1

authorizeMethod · 0.80

Calls 2

constantTimeEqualsFunction · 0.85
isEmptyMethod · 0.80

Tested by

no test coverage detected