| 
    Wt
    4.0.0
    
   | 
 
An authentication token hash. More...
#include <Wt/Auth/Token.h>
Public Member Functions | |
| Token () | |
| Default constructor.  More... | |
| Token (const std::string &hash, const WDateTime &expirationTime, const std::string &purpose, const std::string &scope, const std::string &redirectUri) | |
| Constructor.  | |
| bool | empty () const | 
| Returns whether the token is empty.  More... | |
| const std::string & | hash () const | 
| Returns the hash.  | |
| const WDateTime & | expirationTime () const | 
| Returns the expiration time.  | |
An authentication token hash.
An authentication token is a surrogate for identification or authentication. When a random authentication token is generated, e.g. using WRandom::generateId() it is a good practice to hash it using a cryptographic hash function, and only save this hash in the session or database for later verification. This avoids that a compromised database would leak all the authentication tokens.
| Wt::Auth::Token::Token | ( | ) | 
Default constructor.
Creates an empty token.
| bool Wt::Auth::Token::empty | ( | ) | const | 
Returns whether the token is empty.
An empty token is default constructed.
 1.8.11