1
0
Fork 0
arangodb/Documentation/DocuBlocks/foxx_controller_activateAut...

612 B

Controller.activateAuthentication(opts)

To activate authentication for this controller, call this function before defining any routes. In the opts object you can set the following keys:

  • type: Currently we only support cookie, but this will change in the future
  • cookieLifetime: An integer. Lifetime of cookies in seconds
  • cookieName: A string used as the name of the cookie
  • sessionLifetime: An integer. Lifetime of sessions in seconds

@EXAMPLES

app.activateAuthentication({
  type: "cookie",
  cookieLifetime: 360000,
  cookieName: "my_cookie",
  sessionLifetime: 400,
});