SEP30ResponseIdentity
in package
Identity information in SEP-0030 account responses.
This class represents identity owner information including role and authentication status for account recovery operations.
Tags
Table of Contents
Properties
- $authenticated : bool|null
- $role : string
Methods
- __construct() : mixed
- fromJson() : SEP30ResponseIdentity
- Constructs a SEP30ResponseIdentity from JSON data.
- getAuthenticated() : bool|null
- Gets the authentication status.
- getRole() : string
- Gets the identity role.
- setAuthenticated() : void
- Sets the authentication status.
- setRole() : void
- Sets the identity role.
Properties
$authenticated
public
bool|null
$authenticated
= null
$role
public
string
$role
Methods
__construct()
public
__construct(string $role[, bool|null $authenticated = null ]) : mixed
Parameters
- $role : string
-
The identity role (e.g., "owner", "sender", "receiver"). Client-defined value stored by server and returned in responses.
- $authenticated : bool|null = null
-
Whether the identity is authenticated.
fromJson()
Constructs a SEP30ResponseIdentity from JSON data.
public
static fromJson(array<string|int, mixed> $json) : SEP30ResponseIdentity
Parameters
- $json : array<string|int, mixed>
-
The JSON data to parse.
Return values
SEP30ResponseIdentity —The constructed identity.
getAuthenticated()
Gets the authentication status.
public
getAuthenticated() : bool|null
Return values
bool|null —Whether the identity is authenticated.
getRole()
Gets the identity role.
public
getRole() : string
Return values
string —The role (e.g., "owner", "sender", "receiver").
setAuthenticated()
Sets the authentication status.
public
setAuthenticated(bool|null $authenticated) : void
Parameters
- $authenticated : bool|null
-
Whether the identity is authenticated.
setRole()
Sets the identity role.
public
setRole(string $role) : void
Parameters
- $role : string
-
The role (e.g., "owner", "sender", "receiver").