AI3DHAuthHandler Class Reference
instant3Dhub
|
#include "I3DHAuthHandler.h"


Detailed Description
Implements OAuth 2.0 authorization including token refresh.
This class controls the FHttpServerModule, in particular calling StartAllListeners() and StopAllListeners(). It attempts to listen on a random port in the range [60000, 61000]. It is probably not yet compatible with concurrent use of the server module by the host application or other modules.
Public Member Functions | |
void | Init (const FString &ClientId, const FString &Scope, const FString &AuthorizationUrl, const FString &TokenUrl) |
void | Start () |
void | Reset () |
Public Attributes | |
Config | |
How the handler should respond to the authorization callback (e.g. what is displayed in the browser after the user has logged in). If the RedirectUrl is set, the handler sends a redirect, otherwise the HtmlResponse is used. The HtmlResponse are initialized with a minimal default value. | |
FString | SuccessRedirectUrl |
FString | SuccessHtmlResponse |
FString | ErrorRedirectUrl |
FString | ErrorHtmlResponse |
Events | |
When the handler is started, it launches the SSO portal in the default platform browser. Once the user has completed the login process, either the success or the failure delegate is invoked. Neither callback may be invoked, if the user closes the browser tab without completing the login process. If successful and the response contains a refresh token, the handler will periodically refresh the access token and execute the success delegate again. Should a refresh fail the failure delegate will be executed and no further refreshes will be attempted. The delegates will be executed on the game thread. | |
FI3DHAuthSuccessDelegate | Succeeded |
FI3DHAuthFailureDelegate | Failed |
Member Function Documentation
◆ Init()
void AI3DHAuthHandler::Init | ( | const FString & | ClientId, |
const FString & | Scope, | ||
const FString & | AuthorizationUrl, | ||
const FString & | TokenUrl ) |
Configure the handler with required parameters.
- Note
- MUST be called from game thread.
- MUST NOT be called while the handler is running.
- Parameters
-
ClientId Identifier for the client. Scope The scope. AuthorizationUrl URL of the authorization. TokenUrl URL of the token.
◆ Reset()
void AI3DHAuthHandler::Reset | ( | ) |
Cancel active login process, if one exists, and delete any obtained login information.
- Note
- MUST be called from game thread.
- After calling Reset() the handler can be restarted with AI3DHAuthHandler::Start().
◆ Start()
void AI3DHAuthHandler::Start | ( | ) |
Start the login process.
- Note
- Make sure to set optional configuration properties and bind events first.
- AI3DHAuthHandler::Init() MUST have been called first.
- MUST be called from game thread.
The documentation for this class was generated from the following file:
Generated by