Quark  0.1
OAuth2AccessToken.h++
Go to the documentation of this file.
1 #ifndef __libquark_oauth2_OAuth2AccessToken_hxx
2 #define __libquark_oauth2_OAuth2AccessToken_hxx
3 
4 #include <quark/Quark.h++>
5 
6 #include <QJsonObject>
7 #include <QString>
8 
9 namespace quark {
10 namespace oauth2 {
11 
18 {
19  public:
20 
23 
26 
28  OAuth2AccessToken(const QString &refreshToken);
29 
37  OAuth2AccessToken(const QString &accessToken,
38  const QString &refreshToken,
39  const qint64 &expirationTime,
40  const QString &tokenType);
41 
43  virtual ~OAuth2AccessToken();
44 
46  OAuth2AccessToken& operator=(const OAuth2AccessToken &other);
47 
49  QString accessToken() const
50  { return(_accessToken); }
51 
53  QString refreshToken() const
54  { return(_refreshToken); }
55 
57  qint64 expirationTime() const
58  { return(_expirationTime); }
59 
61  QString tokenType() const
62  { return(_tokenType); }
63 
65  bool isNull() const;
66 
68  bool isExpired() const;
69 
70  private:
71 
72  QString _accessToken;
73  QString _refreshToken;
74  qint64 _expirationTime;
75  QString _tokenType;
76 };
77 
78 } // namespace oauth2
79 } // namespace quark
80 
81 #endif // __libquark_oauth2_OAuth2AccessToken_hxx
QString tokenType() const
Returns the token type.
Definition: OAuth2AccessToken.h++:61
Definition: BarChartView.h++:6
A representation of an OAuth2 access token.
Definition: OAuth2AccessToken.h++:17
QString refreshToken() const
Returns the refresh token.
Definition: OAuth2AccessToken.h++:53
QString accessToken() const
Returns the access token.
Definition: OAuth2AccessToken.h++:49
#define LIBQUARK_API
Definition: Quark.h++:18
qint64 expirationTime() const
Returns the access token&#39;s expiration time.
Definition: OAuth2AccessToken.h++:57