Skip to content

Commit

Permalink
docs: add documentation to passport methods (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImmutableJeffrey authored Oct 16, 2024
1 parent 80c77bf commit 039edd3
Show file tree
Hide file tree
Showing 2 changed files with 292 additions and 13 deletions.
23 changes: 22 additions & 1 deletion Source/Immutable/Public/Immutable/ImmutableDataTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,29 +38,47 @@ struct FImmutableEngineVersionData
FString deviceModel = FGenericPlatformMisc::GetDeviceMakeAndModel();
};

/**
* Structure to hold initialisation data for the Immutable Passport.
*/
USTRUCT()
struct IMMUTABLE_API FImmutablePassportInitData
{
GENERATED_BODY()

/** The Client Id. */
UPROPERTY()
FString clientId;

/**
* (Android, iOS, and macOS only)
* The URL where the browser will redirect after successful authentication.
*/
UPROPERTY()
FString redirectUri;

/** The URL where the browser will redirect after logout is complete. */
UPROPERTY()
FString logoutRedirectUri;

/** The environment to connect to. */
UPROPERTY()
FString environment = ImmutablePassportAction::EnvSandbox;

/** Whether silent logout is enabled. */
UPROPERTY()
bool isSilentLogout = false;

/** Information about engine version */
UPROPERTY()
FImmutableEngineVersionData engineVersion;

/**
* Converts the FImmutablePassportInitData structure to a JSON string representation.
*
* @return A JSON string representation of the FImmutablePassportInitData structure.
* Returns an empty string if the conversion fails.
*/
FString ToJsonString() const;
};

Expand Down Expand Up @@ -158,12 +176,15 @@ struct IMMUTABLE_API FImmutablePassportResult
{
GENERATED_BODY()

/** Whether the response was successful. */
UPROPERTY()
bool Success = false;


/** Error string for the response. */
UPROPERTY()
FString Error;

/** Response payload. */
FImtblJSResponse Response;
};

Expand Down
Loading

0 comments on commit 039edd3

Please sign in to comment.