Ticket #158 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 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@…
Hardware: Operating system:
Product: URL:

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

comment:1 Changed 5 years ago by m.s.vanvliet@…

  • Owner set to robert@…
  • Status changed from new to assigned
  • Milestone set to 0.5.1

comment:2 Changed 5 years ago by robert@…

  • Cc j.saito@… added
  • Owner changed from robert@… to m.s.vanvliet@…

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?

comment:3 Changed 5 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)

comment:4 Changed 5 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.

comment:5 Changed 5 years ago by m.s.vanvliet@…

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