MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / setUserToken

Method setUserToken

sources/db/AuthTable.cpp:80–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80bool AuthTable::setUserToken(const QString& user)
81{
82 QVariantMap map;
83 map["token"] = QCryptographicHash::hash(QUuid::createUuid().toByteArray(), QCryptographicHash::Sha512).toHex();
84
85 VectorPair cond;
86 cond.append(CPair("user", user));
87 return updateRecord(cond, map);
88}
89
90
91const QByteArray AuthTable::getUserToken(const QString& user)

Callers 1

AccessManagerMethod · 0.80

Calls 1

toHexMethod · 0.80

Tested by

no test coverage detected