Struct: FAPITokenInfo

//  APITokenInfo.h : 9

struct NBPATREONAPICLIENT_API FAPITokenInfo;

Reflection-enabled

Specifiers:

  • BlueprintType

Stores an API access token and related information.


Properties

  • AccessToken

    public:
    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.
  • RefreshToken

    public:
    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.
  • Scopes

    public:
    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.
  • TokenLifetime

    public:
    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.
  • TokenReceived

    public:
    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


Methods

  • HasTokenExpired

    //  APITokenInfo.h : 61
    
    public:
    bool HasTokenExpired() const;
    

    Checks if a token's lifetime has expired.


    Returns

    • bool
      
  • 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;
    

    Computes the time remaining (from now) before the token expires.


    Returns

    • FTimespan
      






For any questions, help, suggestions or feature requests, please feel free to contact me at nbpsup@gmail.com