UERPIdentitySubsystem
GameInstance subsystem — server-authoritative identity manager.
Identity Management
| Function | Returns | Description |
|---|
CreateIdentity(AccountName, PIN) | FERPPlayerIdentity* | Create new account |
GetIdentity(PlayerGUID) | FERPPlayerIdentity* | Lookup by GUID |
FindIdentityByAccountName(Name) | FERPPlayerIdentity* | Lookup by account name (case-insensitive) |
FindIdentityByExternalID(Platform, ID) | FERPPlayerIdentity* | Lookup by platform ID |
LinkExternalID(GUID, Platform, ID) | bool | Link platform ID to account |
UnlinkExternalID(GUID, Platform) | bool | Remove platform link |
Authentication
| Function | Returns | Description |
|---|
AuthenticateWithPIN(AccountName, PIN) | bool | Validate PIN (checks lockout) |
IssueToken(PlayerGUID) | FERPSessionToken | Generate signed session token |
ValidateToken(Token) | bool | Verify HMAC + expiry + GUID exists |
SerialiseToken(Token) | FString | Convert token to wire format |
Recovery
| Function | Returns | Description |
|---|
GenerateRecoveryCode(AccountName) | FString | Create 6-char recovery code |
RedeemRecoveryCode(AccountName, Code, NewPIN) | bool | Validate code and reset PIN |
Persistence
| Function | Returns | Description |
|---|
LoadDatabase() | bool | Load all identities from backend |
SaveDatabase() | bool | Persist all identities to backend |
Delegates
| Delegate | Signature | Description |
|---|
OnIdentityCreated | (FERPPlayerIdentity) | New account created |
OnDatabaseSaved | () | Database persisted |
OnRecoveryCodeGenerated | (AccountName, Code, ExternalIDs) | Recovery code ready for delivery |
UERPIdentityComponent
Actor component for PlayerController — handles client-server auth handshake.
Server RPCs
| Function | Description |
|---|
Server_Authenticate(RawToken) | Silent token auth (auto-called on BeginPlay) |
Server_Login(AccountName, PIN) | Existing account login |
Server_Register(AccountName, PIN) | New account creation |
Server_RequestRecovery(AccountName) | Request recovery code |
Server_RedeemRecovery(AccountName, Code, NewPIN) | Redeem code + set new PIN |
Accessors
| Function | Returns | Description |
|---|
GetPlayerGUID() | FString | Authenticated GUID (empty if not auth'd) |
GetAuthState() | ERPAuthStateEnum | Current auth state |
IsAuthenticated() | bool | Convenience predicate |
Delegates
| Delegate | Signature | Description |
|---|
OnAuthStateChanged | (ERPAuthStateEnum) | Auth state changed |
OnLoginRequested | (bool bSessionExpired) | Server requesting login UI |
OnIdentityError | (FString ErrorMessage) | Server sent error |
OnRecoveryCodeDispatched | () | Recovery code acknowledged |
UERPIdentityConfig
Developer Settings — Project Settings → Rogue Paradigm → ElysIdentity.
| Property | Type | Default | Description |
|---|
| PersistenceBackend | Enum | Json | Json, SQLite, or Custom |
| DatabasePath | FString | {ProjectSaved}/ElysIdentity/players | Database file path |
| TokenExpiryDays | int32 | 30 | Session token lifetime |
| ServerHMACSecret | FString | changeme_in_production | HMAC signing secret |
| MaxPINAttempts | int32 | 5 | Failed attempts before lockout |
| PINLockoutSeconds | float | 300 | Lockout duration |
| RecoveryCodeExpirySeconds | float | 900 | Recovery code lifetime |
Data Structures
FERPPlayerIdentity
| Field | Type | Description |
|---|
| PlayerGUID | FString | UUID v4, immutable |
| AccountName | FString | Unique account name |
| PINHash | FString | SHA-256 hex digest |
| PINSalt | FString | 16-char hex salt |
| ExternalIDs | TMap<FString, FString> | Platform → ID map |
| CreatedAt | FDateTime | UTC creation time |
| LastSeenAt | FDateTime | UTC last auth time |
FERPSessionToken
| Field | Type | Description |
|---|
| PlayerGUID | FString | Owner GUID |
| IssuedAt | FDateTime | Issue timestamp |
| ExpiresAt | FDateTime | Expiry timestamp |
| HMAC | FString | HMAC-SHA256 signature |
Wire format: PlayerGUID|ExpiresAt_ISO8601|HMAC
ERPAuthStateEnum
| Value | Description |
|---|
| Pending | Not yet authenticated |
| Authenticated | Successfully authenticated |
| Rejected | Authentication failed |