|
Wt
3.7.1
|
The result of processing an authentication token. More...
#include <Wt/Auth/AuthService>
Public Types | |
| enum | Result { Invalid, Valid } |
| Enumeration that describes the result. More... | |
Public Member Functions | |
| AuthTokenResult (Result result, const User &user=User(), const std::string &newToken=std::string(), int newTokenValidity=-1) | |
| Constructor. More... | |
| Result | result () const |
| Returns the result. | |
| const User & | user () const |
| Returns the identified user. More... | |
| std::string | newToken () const |
| Returns a new token for this user. More... | |
| int | newTokenValidity () const |
| Returns the validity of the new token. More... | |
The result of processing an authentication token.
An authentication token is usually taken from a browser cookie, and used to identify (and possibly authenticate) a user across sessions.
| Wt::Auth::AuthTokenResult::AuthTokenResult | ( | Result | result, |
| const User & | user = User(), |
||
| const std::string & | newToken = std::string(), |
||
| int | newTokenValidity = -1 |
||
| ) |
Constructor.
Creates an authentication token result.
| std::string Wt::Auth::AuthTokenResult::newToken | ( | ) | const |
Returns a new token for this user.
Returns the empty string if there is no new token. See AuthService::authTokenUpdateEnabled().
The returned token is valid only if the result() == Valid.
| int Wt::Auth::AuthTokenResult::newTokenValidity | ( | ) | const |
Returns the validity of the new token.
This returns the token validity in seconds.
Returns -1 if there is no new token, or result() != Valid.
1.8.13