toJson

fun toJson(): Map<String, Any?>

Converts this request identity to a JSON-compatible map.

The returned map uses the SEP-30 specification field names. The authMethods property is serialized under the "auth_methods" key as required by the specification.

Return

A map with "role" and "auth_methods" entries