KD SOAP API Documentation: KDSoapAuthentication Class Reference

| KD SOAP API Documentation 2.2

Loading...
Searching...
No Matches
Public Member Functions | List of all members
KDSoapAuthentication Class Reference

`#include <KDSoapAuthentication.h>`

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

## 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()

Definition at line 30 of file KDSoapAuthentication.h.

## Constructor & Destructor Documentation

## ◆ KDSoapAuthentication() [1/2]

KDSoapAuthentication::KDSoapAuthentication | ( |  | ) |

Constructs an empty authentication object.

Definition at line 33 of file KDSoapAuthentication.cpp.

## ◆ KDSoapAuthentication() [2/2]

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

Constructs a copy of `other`.

Definition at line 39 of file KDSoapAuthentication.cpp.

## ◆ ~KDSoapAuthentication()

KDSoapAuthentication::~KDSoapAuthentication | ( |  | ) |

Destructs the object

Definition at line 51 of file KDSoapAuthentication.cpp.

## Member Function Documentation

## ◆ hasAuth()

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

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

Definition at line 116 of file KDSoapAuthentication.cpp.

## ◆ operator=()

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

Assigns the contents of `other` to this authenticator.

Definition at line 45 of file KDSoapAuthentication.cpp.

## ◆ overrideWSUsernameCreatedTime()

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

Since
  1.8

Returns
  the created time used during WS-UsernameToken authentication

Definition at line 106 of file KDSoapAuthentication.cpp.

Referenced by setOverrideWSUsernameCreatedTime().

## ◆ overrideWSUsernameNonce()

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

Since
  1.8

Returns
  the created time used during WS-UsernameToken authentication

Definition at line 111 of file KDSoapAuthentication.cpp.

Referenced by setOverrideWSUsernameNonce().

## ◆ password()

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

Returns
  the password used for authentication

Definition at line 91 of file KDSoapAuthentication.cpp.

Referenced by setPassword().

## ◆ 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

Definition at line 76 of file KDSoapAuthentication.cpp.

References overrideWSUsernameCreatedTime().

## ◆ setOverrideWSUsernameNonce()

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

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

Since
  1.8

Definition at line 81 of file KDSoapAuthentication.cpp.

References overrideWSUsernameNonce().

## ◆ setPassword()

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

Sets the `password` used for authentication

Definition at line 61 of file KDSoapAuthentication.cpp.

References password().

## ◆ setUsePasswordDigest()

void KDSoapAuthentication::setUsePasswordDigest | ( | const bool | usePasswordDigest | ) |

Sets whether PasswordDigest (default) or PasswordText is used for authentication

Definition at line 66 of file KDSoapAuthentication.cpp.

References usePasswordDigest().

## ◆ setUser()

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

Sets the `user` used for authentication

Definition at line 56 of file KDSoapAuthentication.cpp.

References user().

## ◆ 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

Definition at line 71 of file KDSoapAuthentication.cpp.

References useWSUsernameToken().

## ◆ usePasswordDigest()

bool KDSoapAuthentication::usePasswordDigest | ( |  | ) | const

Returns
  whether PasswordDigest is used for authentication

Definition at line 96 of file KDSoapAuthentication.cpp.

Referenced by setUsePasswordDigest().

## ◆ user()

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

Returns
  the user used for authentication

Definition at line 86 of file KDSoapAuthentication.cpp.

Referenced by setUser().

## ◆ useWSUsernameToken()

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

Since
  1.8

Returns
  whether WS-UsernameToken is used for authentication

Definition at line 101 of file KDSoapAuthentication.cpp.

Referenced by setUseWSUsernameToken().

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

- KDSoapAuthentication.h
- KDSoapAuthentication.cpp

© 2010-2024 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/
Generated on Sun Jan 7 2024 11:47:36 for KD SOAP API Documentation by doxygen 1.9.8