-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauth.ts
34 lines (33 loc) · 953 Bytes
/
auth.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"use strict";
import env from "Elucidate/Env";
export default {
/*
|--------------------------------------------------------------------------
| Authenticator
|--------------------------------------------------------------------------
|
| ExpressWebJs does not support session state, incoming requests that
| you wish to authenticate must be authenticated via a stateless mechanism such as API tokens.
|
*/
authenticator: "jwt",
/*
|--------------------------------------------------------------------------
| Jwt
|--------------------------------------------------------------------------
|
| The jwt authenticator works by passing a jwt token on each HTTP request
| via HTTP `Authorization` header.
|
*/
jwt: {
model: "User_model",
driver: "jwt",
uid: "email",
password: "password",
secret: env("APP_KEY"),
options: {
expiresIn: 86400, //default is 86400 (24 hrs)
},
},
};