| KD SOAP 1.9.1

Public Member Functions | List of all members
KDSoapAuthentication Class Reference

`#include <KDSoapAuthentication.h>`

## Public Member Functions
| KDSoapAuthentication ()
| KDSoapAuthentication (const KDSoapAuthentication &other)
| ~KDSoapAuthentication ()
void | setUser (const QString &user)
QString | user () const
void | setPassword (const QString &password)
QString | password () const
void | setUseWSUsernameToken (bool useWSUsernameToken)
bool | useWSUsernameToken () const
void | setOverrideWSUsernameCreatedTime (QDateTime overrideWSUsernameCreatedTime)
QDateTime | overrideWSUsernameCreatedTime () const
void | setOverrideWSUsernameNonce (QByteArray overrideWSUsernameNonce)
QByteArray | overrideWSUsernameNonce () const
bool | hasAuth () const
KDSoapAuthentication & | operator= (const KDSoapAuthentication &other)

## Detailed Description

KDSoapAuthentication provides an authentication object. Currently it only supports authentication based on user/password, but its design makes it extensible to other forms of authentication.

See also
  KDSoapClientInterface::setAuthentication()

## Constructor & Destructor Documentation

## ◆ KDSoapAuthentication() [1/2]

KDSoapAuthentication::KDSoapAuthentication | ( |  | ) |

Constructs an empty authentication object.

## ◆ KDSoapAuthentication() [2/2]

KDSoapAuthentication::KDSoapAuthentication | ( | const KDSoapAuthentication & | other | ) |

Constructs a copy of `other`.

## ◆ ~KDSoapAuthentication()

KDSoapAuthentication::~KDSoapAuthentication | ( |  | ) |

Destructs the object

## Member Function Documentation

## ◆ setUser()

void KDSoapAuthentication::setUser | ( | const QString & | user | ) |

Sets the `user` used for authentication

## ◆ user()

QString KDSoapAuthentication::user | ( |  | ) | const

Returns
  the user used for authentication

## ◆ setPassword()

void KDSoapAuthentication::setPassword | ( | const QString & | password | ) |

Sets the `password` used for authentication

## ◆ password()

QString KDSoapAuthentication::password | ( |  | ) | const

Returns
  the password used for authentication

## ◆ setUseWSUsernameToken()

void KDSoapAuthentication::setUseWSUsernameToken | ( | bool | useWSUsernameToken | ) |

Sets whether WS-UsernameToken is used for authentication. When set, the WS-UsernameToken headers are included in each request. See https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0.pdf

Since
  1.8

## ◆ useWSUsernameToken()

bool KDSoapAuthentication::useWSUsernameToken | ( |  | ) | const

Since
  1.8

Returns
  whether WS-UsernameToken is used for authentication

## ◆ setOverrideWSUsernameCreatedTime()

void KDSoapAuthentication::setOverrideWSUsernameCreatedTime | ( | QDateTime | overrideWSUsernameCreatedTime | ) |

Sets the created time used during WS-UsernameToken authentication This is useful for devices with an incorrect time and during testing

Since
  1.8

## ◆ overrideWSUsernameCreatedTime()

QDateTime KDSoapAuthentication::overrideWSUsernameCreatedTime | ( |  | ) | const

Since
  1.8

Returns
  the created time used during WS-UsernameToken authentication

## ◆ setOverrideWSUsernameNonce()

void KDSoapAuthentication::setOverrideWSUsernameNonce | ( | QByteArray | overrideWSUsernameNonce | ) |

Sets the nonce used during WS-UsernameToken authentication This is useful during testing

Since
  1.8

## ◆ overrideWSUsernameNonce()

QByteArray KDSoapAuthentication::overrideWSUsernameNonce | ( |  | ) | const

Since
  1.8

Returns
  the created time used during WS-UsernameToken authentication

## ◆ hasAuth()

bool KDSoapAuthentication::hasAuth | ( |  | ) | const

Returns
  `true` if authentication was defined, or `false` if this object is only a default-constructed KDSoapAuthentication().

## ◆ operator=()

KDSoapAuthentication & KDSoapAuthentication::operator= | ( | const KDSoapAuthentication & | other | ) |

Assigns the contents of `other` to this authenticator.

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

- src/KDSoapClient/KDSoapAuthentication.h
- src/KDSoapClient/KDSoapAuthentication.cpp

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/