7 #include <Cutelyst/Plugins/Authentication/authentication.h>
9 #include <QtCore/QCryptographicHash>
13 class CredentialPasswordPrivate;
65 [[nodiscard]]
QString passwordField()
const;
71 void setPasswordField(
const QString &fieldName);
77 [[nodiscard]] PasswordType passwordType()
const;
83 void setPasswordType(PasswordType type);
89 [[nodiscard]]
QString passwordPreSalt()
const;
95 void setPasswordPreSalt(
const QString &passwordPreSalt);
101 [[nodiscard]]
QString passwordPostSalt()
const;
107 void setPasswordPostSalt(
const QString &passwordPostSalt);
112 [[nodiscard]]
static bool validatePassword(
const QByteArray &password,
118 [[nodiscard]]
static bool validatePassword(
const QString &password,
const QString &correctHash);
153 [[nodiscard]]
inline static QString createPassword(
const QString &password);
173 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