Package edu.ksu.lti.launch.service
Class LtiSessionService
- java.lang.Object
-
- edu.ksu.lti.launch.service.LtiSessionService
-
@Service public class LtiSessionService extends Object
Created by alexanda on 7/27/16.
-
-
Constructor Summary
Constructors Constructor Description LtiSessionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LtiSessiongetLtiSession()Get the LtiSession object from the HTTP session.
-
-
-
Method Detail
-
getLtiSession
public LtiSession getLtiSession() throws NoLtiSessionException
Get the LtiSession object from the HTTP session. It is put there up in the ltiLaunch method. This should really be done using a SpringSecurityContext to get the authenticated principal which could then hold this LTI information. But I'm having serious trouble figuring out how to do this correctly and I need *some* kind of session management for right now. Another approach would be to create this as a session scoped bean but the problem there is that I need to share this session object across controllers (the OauthController to be specific) and this breaks for some reason so I'm rolling my own session management here.- Returns:
- The current user's LTI session information
- Throws:
NoLtiSessionException- if the user does not have a valid LTI session.
-
-