Struct: FAPITokenInfo
// APITokenInfo.h : 9
struct NBPATREONAPICLIENT_API FAPITokenInfo;
Reflection-enabled
Specifiers:
- BlueprintType
Stores an API access token and related information.
Properties
-
AccessTokenpublic: FString AccessToken;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|Token
Access token used to make authenticated requests (e.g. retrieve user identity info). This is usually obtained via oath. -
RefreshTokenpublic: FString RefreshToken;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|Token
When the AccessToken expires, this token can be used to request a new access token without requiring the user to login again. -
Scopespublic: FString Scopes;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|Token
The scopes AccessToken is allowed to access. This may differ from the scopes which were requested during authentication. -
TokenLifetimepublic: FTimespan TokenLifetime;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|Token
The time (in seconds) after TokenReceived that the AccessToken is valid. If `FDateTime::Now() - (TokenReceived + TokenLifetime)` is < 0, the **`Self::AccessToken`** has expired. -
TokenReceivedpublic: FDateTime TokenReceived;
Reflection-enabled
Specifiers:
- EditAnywhere
- BlueprintReadWrite
- Category = NBPatreonAPIClient|Token
The time (UTC) AccessToken and RefreshToken were received. This is used to check if the AccessToken is still valid before attempting to use it.
Constructors
-
FAPITokenInfo// APITokenInfo.h : 49 public: FAPITokenInfo(); -
FAPITokenInfo// APITokenInfo.h : 51 public: FAPITokenInfo( FString accessToken, FString refreshToken, int64 lifetime, FString scopes );
Arguments
-
accessTokenFString accessToken -
refreshTokenFString refreshToken -
lifetimeint64 lifetime -
scopesFString scopes
-
Methods
-
HasTokenExpired// APITokenInfo.h : 61 public: bool HasTokenExpired() const; -
IsValid// APITokenInfo.h : 68 public: bool IsValid() const;Checks that there is an access token which has not yet expired. Does not check the refresh token.
Returns
-
bool
-
-
RemainingLifetime// APITokenInfo.h : 56 public: FTimespan RemainingLifetime() const;
For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com