-
Notifications
You must be signed in to change notification settings - Fork 70
/
auth-client.model.ts
67 lines (59 loc) · 1.25 KB
/
auth-client.model.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright (c) 2023 Sourcefuse Technologies
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import {DataObject, Model, model, property} from '@loopback/repository';
import {BaseEntity} from '@sourceloop/core';
import {IAuthClient} from 'loopback4-authentication';
@model({
name: 'auth_clients',
})
export class AuthClient<T = DataObject<Model>>
extends BaseEntity<T & AuthClient>
implements IAuthClient
{
@property({
type: 'number',
id: true,
})
id?: number;
@property({
name: 'client_id',
type: 'string',
required: true,
})
clientId: string;
@property({
name: 'client_secret',
type: 'string',
})
clientSecret: string;
@property({
type: 'string',
name: 'redirect_url',
})
redirectUrl?: string;
@property({
type: 'string',
required: true,
})
secret: string;
@property({
type: 'number',
required: true,
name: 'access_token_expiration',
})
accessTokenExpiration: number;
@property({
type: 'number',
required: true,
name: 'refresh_token_expiration',
})
refreshTokenExpiration: number;
@property({
type: 'number',
required: true,
name: 'auth_code_expiration',
})
authCodeExpiration: number;
}