Get HttpSession on authentication Handler

32 views
Skip to first unread message

Manfredo Hopp

unread,
Nov 9, 2016, 3:15:03 PM11/9/16
to Cas
Hi
, we have cas 4.0 installed with a modified QueryDatabseAuthenticationHandler and want to access
  http Session.

How cas this be done?

Thanks Manfredo

Misagh Moayyed

unread,
Nov 9, 2016, 3:53:46 PM11/9/16
to cas-...@apereo.org

This is really a question for Spring.

 

Short of it is, that it cannot. It’s a bad idea. But you may look into RequestContextHolder.

 

--Misagh

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAB623R_r3AZc0xC%3DGC_OzfxmUghLhR10m3Yjznx%2BvqfrS2W_Kg%40mail.gmail.com.

Manfredo Hopp

unread,
Nov 9, 2016, 11:37:23 PM11/9/16
to Cas
Thanks Misagh I could imagine your answer, so let me put my use case other way round.

After Cas user authentication I want to sent lastLogin Date to the redirected service
How can I achieve that?

I was wondering if it was possible through a queryparameter or session attribute.

Thanks

2016-11-09 17:53 GMT-03:00 Misagh Moayyed <mmoa...@unicon.net>:

This is really a question for Spring.

 

Short of it is, that it cannot. It’s a bad idea. But you may look into RequestContextHolder.

 

--Misagh

 

From: cas-...@apereo.org [mailto:cas-...@apereo.org] On Behalf Of Manfredo Hopp
Sent: Wednesday, November 9, 2016 1:15 PM
To: Cas <cas-...@apereo.org>
Subject: [cas-user] Get HttpSession on authentication Handler

 

Hi
, we have cas 4.0 installed with a modified QueryDatabseAuthenticationHandler and want to access
  http Session.

How cas this be done?

Thanks Manfredo

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/01c901d23acb%245ae317d0%2410a94770%24%40unicon.net.

Misagh Moayyed

unread,
Nov 10, 2016, 10:51:58 AM11/10/16
to cas-...@apereo.org

Unless you mean something else, AuthN date is already sent back to the app once after validation is successful.

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--

- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

 

--

- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAB623R8QB%3DFPvshNzW1w0ZoLddfnZg9RWBHTNghJsw8HgjaUZw%40mail.gmail.com.

Ray Bon

unread,
Nov 10, 2016, 11:07:14 AM11/10/16
to cas-...@apereo.org
Manfredo,

If you are intending to display lastLogin date to the user [as a form of security awareness], you will have to store that as part of your application since it would be possible for a user to login through CAS but not access the application.

Ray
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAB623R8QB%3DFPvshNzW1w0ZoLddfnZg9RWBHTNghJsw8HgjaUZw%40mail.gmail.com.

-- 
Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831 | CLE C023 | rb...@uvic.ca

Manfredo Hopp

unread,
Nov 12, 2016, 12:44:05 AM11/12/16
to Cas
Thank you for replies!  as Ray said I store lasLogin in my database, but couldnt realiza how to update it AFTER sending this data to the user, so I added a custom class in login flow to achieve that!

Regards Manfredo

To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/01c901d23acb%245ae317d0%2410a94770%24%40unicon.net.
--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.

-- 
Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831 | CLE C023 | rb...@uvic.ca

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscribe@apereo.org.
Reply all
Reply to author
Forward
0 new messages