html5sdk: how to authenticate using OTDS

In the API reference guide, there's a sample code for authenticating using sso.
Now, i'd like to authenticate using OTDS in html5sdk.

Please advise.
Thanks,