Hi,
This should be possible. I have done something similar multiple times before. The latest one was a HTML app that had a custom logon screen. The users entered their username/password. The application server passed it to SAP portal via HTTP parameters. If everything was ok the portal issued a SSO cookie that was used for some consequent calls. It was a workaround to avoid a proper implementation of SSO. The only missing part is to figure out how your standalone app can reuse AD credentials of a user that is running the app. I can't help you with that but i am pretty sure ther must be API for that.
Cheers