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

26 lines
612 B
Markdown

`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
```js
app.activateAuthentication({
type: "cookie",
cookieLifetime: 360000,
cookieName: "my_cookie",
sessionLifetime: 400,
});
```