-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
40 lines (32 loc) · 1.04 KB
/
index.js
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
'use strict';
const Config = require('./lib/config');
const { Client } = require('./lib/client');
const AuthorizationCodeGrantType = require('./lib/authorization-code-grant-type');
const ResourceOwnerPasswordGrantType = require('./lib/resource-owner-password-grant-type');
const ClientCredentialsGrantType = require('./lib/client-credentials-grant-type');
class AuthorizationCode extends AuthorizationCodeGrantType {
constructor(options) {
const config = Config.apply(options);
const client = new Client(config);
super(config, client);
}
}
class ClientCredentials extends ClientCredentialsGrantType {
constructor(options) {
const config = Config.apply(options);
const client = new Client(config);
super(config, client);
}
}
class ResourceOwnerPassword extends ResourceOwnerPasswordGrantType {
constructor(options) {
const config = Config.apply(options);
const client = new Client(config);
super(config, client);
}
}
module.exports = {
ResourceOwnerPassword,
ClientCredentials,
AuthorizationCode,
};