Wiz
Wiz

Reputation: 4865

Advantages of pyramid_beaker over native pyramid session management

What are the advantages of using pyramid_beaker instead of just using something like AuthTktAuthenticationPolicy for session authentication?

Upvotes: 2

Views: 839

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1123410

AuthTktAuthenticationPolicy only issues encrypted authentication cookies, and are not, in a technical sense, tied to sessions. You can only use this to identify, securely, that a user is still the same entity that logged in during an earlier HTTP connection. The cookie contains all the information needed to re-identify the user on every HTTP request. AuthTktAuthenticationPolicy cookies are compatible with the mod_auth_tkt Apache module.

A pyramid_beaker session on the other hand, uses a cookie to tie a returning browser connection to some persistent server-side information. Using such a session allows your application to associate arbitrary data with a website visitor, that is not stored in the browser.

See Webserver Session management on Wikipedia

Upvotes: 5

Related Questions