rkh/rack-protection — Issue #18: AuthenticityToken should provide a method to retrieve the token
Author: acrispino
Created: 2012-02-07 09:01:30+00:00
State: open

AuthenticityToken stores the token in session[:csrf]. This is not documented in the README.

I'd like it if a method was provided that both retrieved the token and initialized the token if one does not exist. This is similar to what rails and rack_csrf do. It is not hard to implement myself but it would be nice for users of the csrf token classes to not need to know how tokens are generated (or copied from rails, it looks like?)