Ticket #158 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Create a remote logout call

Reported by: m.s.vanvliet@… Owned by: m.s.vanvliet@…
Priority: major Milestone: 0.5.1
Component: General Version:
Keywords: Cc: j.saito@…
Product: Operating system:
URL: Hardware:

Description

At this moment I can Login a user via:
/login/auth_remote?consumer=?&token=?&returnUrl=?

I also want to be able to logout this user

Change History

Changed 3 years ago by m.s.vanvliet@…

  • owner set to robert@…
  • status changed from new to assigned
  • milestone set to 0.5.1

Changed 3 years ago by robert@…

  • owner changed from robert@… to m.s.vanvliet@…
  • cc j.saito@… added

I have created a [gscf]/logout/remote procedure to logout the remote users. I could not make it a rest call, so you have to redirect the user here. You can provide a spring-security-redirect parameter to redirect the user back to your module (e.g. [gscf]/logout/remote?consumer=xx&token=yy&spring-security-redirect= http://www.nmcdsp.org).

The reason for this is that if the user has logged in and checked the 'remember-me' box, a cookie is set in his browser. If you call for a logout using a rest call, this cookie can't be removed, and the user will remain logged in. I hope this way will still give you enough flexibility.

Would you test this feature?

Changed 3 years ago by m.s.vanvliet@…

  • owner changed from m.s.vanvliet@… to robert@…

It's not working for me... in the Metabolomics-Module I do this:

2010-11-02 09:21:22,754 [http-8183-2] INFO dsp.LogoutController? - Session.User is now null
2010-11-02 09:21:22,755 [http-8183-2] INFO dsp.LogoutController? - Session.sessionToken is now null
2010-11-02 09:21:22,755 [http-8183-2] INFO dsp.LogoutController? - Redirecting to:  http://localhost:8080/gscf/logout/remote?consumer=http://localhost:8183/nmcdsp&token=6bd31fd2-cc1a-41b2-b7aa-191f788acf3c&spring-security-redirect=http://localhost:8183/nmcdsp/study/list

Then GSCF returns a ERROR 500... Grails tells me this:

2010-11-02 09:21:22,790 [http-8080-2] ERROR errors.GrailsExceptionResolver? - No signature of method: static dbnp.authentication.AuthenticationService?.logOffRemotely() is applicable for argument types: (java.lang.String, java.lang.String) values:  6bd31fd2-cc1a-41b2-b7aa-191f788acf3c
Possible solutions: logOffRemotely(java.lang.String, java.lang.String), logInRemotely(java.lang.String, java.lang.String, dbnp.authentication.SecUser?)
groovy.lang.MissingMethodException?: No signature of method: static dbnp.authentication.AuthenticationService?.logOffRemotely() is applicable for argument types: (java.lang.String, java.lang.String) values:  6bd31fd2-cc1a-41b2-b7aa-191f788acf3c
Possible solutions: logOffRemotely(java.lang.String, java.lang.String), logInRemotely(java.lang.String, java.lang.String, dbnp.authentication.SecUser?)

at dbnp.authentication.LogoutController?$_closure2.doCall(LogoutController?.groovy:21)
at dbnp.authentication.LogoutController?$_closure2.doCall(LogoutController?.groovy)
at java.lang.Thread.run(Thread.java:619)

Changed 3 years ago by robert@…

  • owner changed from robert@… to m.s.vanvliet@…

hmm, I shouldn't have committed it too fast. I've fixed the bug, and now it should work again.

Changed 3 years ago by m.s.vanvliet@…

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.