Stellar PHP SDK API Documentation

SEP30AuthMethod

Authentication method for SEP-30 account recovery identity verification.

Represents a single authentication method that can be used to prove identity ownership. Multiple authentication methods can be associated with a single identity role.

STANDARD AUTHENTICATION TYPES:

stellar_address:

  • Stellar account address in G... format (e.g., "GDUAB...")
  • Proven via SEP-10 Web Authentication
  • Provides highest security as it requires cryptographic proof

phone_number:

  • Phone number in ITU-T E.164 international format
  • Must include country code with leading + and no spaces
  • Example: "+10000000001" (not "+1 000 000 0001")
  • Vulnerable to SIM swapping attacks - evaluate risk for account value

email:

  • Standard email address format (e.g., "user@example.com")
  • Security depends on email provider's authentication

CUSTOM AUTHENTICATION TYPES:

  • Custom types may be supported by specific server implementations
  • Check recovery server documentation for supported custom types
Tags
see
https://github.com/stellar/stellar-protocol/blob/v0.8.1/ecosystem/sep-0030.md#common-authentication-methods
see
https://www.itu.int/rec/T-REC-E.164

ITU-T E.164 Phone Number Format

see
SEP30RequestIdentity
see
RecoveryService

Table of Contents

Properties

$type  : string
$value  : string

Methods

__construct()  : mixed
Constructs a new authentication method.
getType()  : string
Gets the authentication method type.
getValue()  : string
Gets the authentication value/identifier.
setType()  : void
Sets the authentication method type.
setValue()  : void
Sets the authentication value/identifier.
toJson()  : array<string|int, mixed>

Properties

Methods

__construct()

Constructs a new authentication method.

public __construct(string $type, string $value) : mixed
Parameters
$type : string

The authentication method type (e.g., "stellar_address", "phone_number", "email").

$value : string

The authentication value/identifier in the format required by the type.

getType()

Gets the authentication method type.

public getType() : string
Return values
string

The type (e.g., "stellar_address", "phone_number", "email").

getValue()

Gets the authentication value/identifier.

public getValue() : string
Return values
string

The value in format specific to the type (e.g., "GDUAB...", "+10000000001", "user@example.com").

setType()

Sets the authentication method type.

public setType(string $type) : void
Parameters
$type : string

The type (e.g., "stellar_address", "phone_number", "email").

setValue()

Sets the authentication value/identifier.

public setValue(string $value) : void
Parameters
$value : string

The value in format specific to the type.

toJson()

public toJson() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results