CsrfTokenController
class CsrfTokenController implements ContainerInjectionInterface (View source)
Returns responses for CSRF token routes.
Properties
| protected CsrfTokenGenerator | $tokenGenerator | The CSRF token generator. |
Methods
static
create(ContainerInterface $container)
Instantiates a new instance of this class.
Response
csrfToken()
Returns a CSRF protecting session token.
Details
__construct(CsrfTokenGenerator $token_generator)
Constructs a new CsrfTokenController object.
static
create(ContainerInterface $container)
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
Response
csrfToken()
Returns a CSRF protecting session token.