7#include <Cutelyst/Plugins/Authentication/authentication.h>
8#include <Cutelyst/cutelyst_global.h>
10#include <QtCore/QCryptographicHash>
14class CredentialPasswordPrivate;
66 [[nodiscard]]
QString passwordField()
const;
72 void setPasswordField(
const QString &fieldName);
78 [[nodiscard]] PasswordType passwordType()
const;
84 void setPasswordType(PasswordType type);
90 [[nodiscard]]
QString passwordPreSalt()
const;
96 void setPasswordPreSalt(
const QString &passwordPreSalt);
102 [[nodiscard]]
QString passwordPostSalt()
const;
108 void setPasswordPostSalt(
const QString &passwordPostSalt);
113 [[nodiscard]]
static bool validatePassword(
const QByteArray &password,
119 [[nodiscard]]
static bool validatePassword(
const QString &password,
const QString &correctHash);
154 [[nodiscard]]
inline static QString createPassword(
const QString &password);
174 CredentialPasswordPrivate *d_ptr;
Abstract class to validate authentication credentials like user name and password.
Combines user store and credential validation into a named realm.
Container for user data retrieved from an AuthenticationStore.
Use password based authentication to authenticate a user.
static bool validatePassword(const QByteArray &password, const QByteArray &correctHash)
static QByteArray createPassword(const QByteArray &password, QCryptographicHash::Algorithm method, int iterations, int saltByteSize, int hashByteSize)
The Cutelyst namespace holds all public Cutelyst API.
QString fromLatin1(QByteArrayView str)
QByteArray toLatin1() const const
QByteArray toUtf8() const const