author | Michael Krelin <hacker@klever.net> | 2007-08-09 11:23:36 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-08-09 11:23:36 (UTC) |
commit | 65bab7c9f984d6fe45ce72e7db014c40eba4d240 (patch) (side-by-side diff) | |
tree | 28c4791aea6b7dc404ad0d27050c34f447a84314 /include/opkele/association.h | |
parent | 1f347795ef5eba50892fd777c173a2a6db1755f2 (diff) | |
download | libopkele-65bab7c9f984d6fe45ce72e7db014c40eba4d240.zip libopkele-65bab7c9f984d6fe45ce72e7db014c40eba4d240.tar.gz libopkele-65bab7c9f984d6fe45ce72e7db014c40eba4d240.tar.bz2 |
associations robustness improvements and documentation updates
Diffstat (limited to 'include/opkele/association.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | include/opkele/association.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/opkele/association.h b/include/opkele/association.h index a8f3915..72eff5b 100644 --- a/include/opkele/association.h +++ b/include/opkele/association.h @@ -1,68 +1,70 @@ #ifndef __OPKELE_ASSOCIATION_H #define __OPKELE_ASSOCIATION_H #include <time.h> #include <opkele/types.h> /** * @file * @brief reference implementation of association_t */ namespace opkele { /** * reference implementation of association_t class. */ class association : public association_t { public: /** * OpenID server name */ string _server; /** * association handle */ string _handle; /** * association type */ string _assoc_type; /** * the secret */ secret_t _secret; /** * expiration time */ time_t _expires; /** * statelessness of the assoc_handle */ bool _stateless; /** * @param __server the server name * @param __handle association handle * @param __assoc_type association type * @param __secret the secret * @param __expires expiration time * @param __stateless statelessness of the assoc_handle */ association(const string& __server, const string& __handle, const string& __assoc_type, const secret_t& __secret, time_t __expires, bool __stateless) : _server(__server), _handle(__handle), _assoc_type(__assoc_type), _secret(__secret), _expires(__expires), _stateless(__stateless) { } virtual string server() const { return _server; } virtual string handle() const { return _handle; } virtual string assoc_type() const { return _assoc_type; } virtual secret_t secret() const { return _secret; } virtual int expires_in() const { return _expires-time(0); } virtual bool stateless() const { return _stateless; } + + virtual bool is_expired() const { return _expires<time(0); } }; } #endif /* __OPKELE_ASSOCIATION_H */ |