Created
May 17, 2020 17:33
-
-
Save chris-gong/0da4b256a505f40e684a80316f6830d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fill out your copyright notice in the Description page of Project Settings. | |
#pragma once | |
#include "CoreMinimal.h" | |
#include "Engine/GameInstance.h" | |
#include "Runtime/Online/HTTP/Public/Http.h" | |
#include "GameLiftTutorialGameInstance.generated.h" | |
/** | |
* | |
*/ | |
UCLASS() | |
class GAMELIFTTUTORIAL_API UGameLiftTutorialGameInstance : public UGameInstance | |
{ | |
GENERATED_BODY() | |
public: | |
UGameLiftTutorialGameInstance(); | |
virtual void Shutdown() override; | |
UPROPERTY() | |
FString AccessToken; | |
UPROPERTY() | |
FString IdToken; | |
UPROPERTY() | |
FString RefreshToken; | |
UPROPERTY() | |
FTimerHandle RetrieveNewTokensHandle; | |
UFUNCTION() | |
void SetCognitoTokens(FString NewAccessToken, FString NewIdToken, FString NewRefreshToken); | |
private: | |
FHttpModule* HttpModule; | |
UPROPERTY() | |
FString ApiUrl; | |
UFUNCTION() | |
void RetrieveNewTokens(); | |
void OnRetrieveNewTokensResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment