Here is a blog post explaining how to do it, but since the authentication is inherently cookie based, you'd have to jump some hoops to get this cookie into your thick client.
This is bit of a hack, though. It seems that you are trying to use authentication mechanism designed for the web with a thick client. Maybe if you give some more information for the app you are building, it will help.