Waffle SSO for a Windows desktop application (doesn't run on browsers)

69 views
Skip to first unread message

Dimas Messias

unread,
Feb 22, 2022, 9:32:24 AM2/22/22
to waffle

Hello!

I am trying to use the Waffle for Single Sign-On on Windows with Tomcat 7 and Java 7, it's a desktop application.
As it doesn't run the browser, most of the example found on the internet doesn't really apply to the project.

  • Waffle 1.8.3
  • Tomcat7
  • Java 7
  • Spring 3.2

I also added all the filters, the context Valve and nothing makes any usage of that, but if I remove everything and leave only the below code, it will still work the same.

I based the token generation code on the link example

https://tuhrig.de/a-windows-sso-for-java-on-client-and-server/

I tried to use the server part on the server-side, but I had an invalid token error.

// accept the token on the server serverContext = provider.acceptSecurityToken(connectionId, clientContext.getToken(), securityPackage);

com.sun.jna.platform.win32.Win32Exception: The token supplied to the function is invalid

If I disconnect my local machine from the VPN, it will throw an error saying it was not able to verify the user, so I believe the code is kind of working.

Do you guys have any good examples for using the package in desktop applications?
Can I trust the code is doing the right thing?

The samples included in the release file run on the browser, not my case.  

Reply all
Reply to author
Forward
0 new messages