python - Using beaker sessions for checking if user is authenticated in Pyramid -


I am making a webf using the pyramid with beaker sessions.
Use the user ID request session ['user_id'] and some other information after successful signing and then checking to see if the user is already signed in:

  if 'user_id' in request_session: # user is logged in to another: # user is not signed in or session expired Question: Is it safe to rely on sessions or is it Better and / or using the pyramid Not more secure  authenticated_userid () with   (remember) from  and  Forget ()   pyramid.security ?   

Use Pyramid_bicker, and then pyramid.autrication Using authenticated_userid () , check whether they are logged in or not, if it does none , then they are not.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -