lintel 0.2.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
lintel::UserPasswordChangeDto Class Reference

#include <UserPasswordChangeDto.h>

Inheritance diagram for lintel::UserPasswordChangeDto:
lintel::JsonSerializable

Public Member Functions

 UserPasswordChangeDto ()=default
 
 UserPasswordChangeDto (std::string userName, std::string oldPassword, std::string newPassword)
 
const std::string & getUserName () const
 
const std::string & getOldPassword () const
 
const std::string & getNewPassword () const
 
void serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const override
 
bool deserialize (const rapidjson::Value &obj) override
 
- Public Member Functions inherited from lintel::JsonSerializable
 JsonSerializable ()=default
 
virtual ~JsonSerializable ()=default
 
virtual std::string serialize () const
 
virtual void deserialize (const std::string &json)
 

Detailed Description

DTO for changing a user's password (passwords are Base64-encoded).

Constructor & Destructor Documentation

◆ UserPasswordChangeDto() [1/2]

lintel::UserPasswordChangeDto::UserPasswordChangeDto ( )
default

Default constructor

◆ UserPasswordChangeDto() [2/2]

lintel::UserPasswordChangeDto::UserPasswordChangeDto ( std::string  userName,
std::string  oldPassword,
std::string  newPassword 
)

Construct from all fields

Parameters
userNamethe target user name
oldPasswordthe current password (Base64-encoded)
newPasswordthe new password (Base64-encoded)

Member Function Documentation

◆ deserialize()

bool lintel::UserPasswordChangeDto::deserialize ( const rapidjson::Value &  obj)
overridevirtual

Deserialize from JSON

Parameters
objthe JSON value
Returns
true on success

Reimplemented from lintel::JsonSerializable.

◆ getNewPassword()

const std::string & lintel::UserPasswordChangeDto::getNewPassword ( ) const

Get the new password

Returns
the new password

◆ getOldPassword()

const std::string & lintel::UserPasswordChangeDto::getOldPassword ( ) const

Get the current password

Returns
the current password

◆ getUserName()

const std::string & lintel::UserPasswordChangeDto::getUserName ( ) const

Get the target user name

Returns
the user name

◆ serialize()

void lintel::UserPasswordChangeDto::serialize ( rapidjson::Writer< rapidjson::StringBuffer > *  writer) const
overridevirtual

Serialize to JSON

Parameters
writerthe rapidjson writer

Implements lintel::JsonSerializable.


The documentation for this class was generated from the following file: