Sorry about that, I had simple auth on the brain when I answered that. I don’t believe the device setup SDK has a way to do that part of two-legged.
For two-legged, when you create the customer and claim code on your own server, you don’t want the authentication/account creation part of the device SDK.
Since getting the claim code from your server to your app will require something custom, that can’t be part of the device SDK.
The one part that would be useful would be the part about switching the Wi-Fi and sending the claim code to the device.
The other problem is that the device SDK monitors the event stream to see if the device comes online. That’s how it verifies claiming. But for two-legged, since the phone app doesn’t authenticate as the customer, it doesn’t have a customer-scoped access token, so it can’t monitor the event stream for the customer.
As far as I know you can’t do the network switching and claim code setting from the device SDK, though it would make sense to be able to do that step, I think.