简体   繁体   中英

How can I access session object in CKAN extension?

I am writing an CKAN extension, where I am implementing CKAN interface IAuthenticator and I need to save some additional information about logged-in user in session. I have found out that CKAN uses beaker session. How can I access it? In the documentation of CKAN is just one sentence: The Session object is available through the toolkit.

Can you help me please?

The session is available as a variable to templates, but it doesn't contain much information - just some info about the User's session cookie. The cookie itself just contains an auth token.

http://docs.ckan.org/en/latest/theming/variables-and-functions.html#session

What are you trying to do - what info about the user do you need and where are you trying to access it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM