-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathstorage.js
58 lines (50 loc) · 1.54 KB
/
storage.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const mongoose = require('mongoose');
mongoose.connect(process.env.MONGODB_URL || 'mongodb://localhost/fido');
var storage = {};
storage.Credentials = mongoose.model('Credential', new mongoose.Schema({
uid: {type: String, index: true},
id: {type: String, index: true},
idHex: String,
transports: [{type: String}],
metadata: {
rpId: String,
userName: String,
residentKey: String
},
creationData: {
publicKey: String,
publicKeySummary: String,
publicKeyHex: String,
aaguid: String,
attestationStatementHex: String,
attestationStatementSummary: String,
attestationStatementChainJSON : String,
authenticatorDataSummary: String,
authenticatorDataHex: String,
extensionDataHex: String,
authenticatorData: String,
attestationObject: String,
clientDataJSON: String,
clientDataJSONHex: String,
publicKey2: String,
publicKeyAlgorithm: Number,
authenticatorAttachment: String,
prfEnabled: Boolean,
prfFirst: String,
prfSecond: String,
},
authenticationData: {
authenticatorDataSummary: String,
signCount: Number,
userHandleHex: String,
authenticatorDataHex: String,
clientDataJSON: String,
clientDataJSONHex: String,
signatureHex: String,
extensionDataHex: String,
authenticatorAttachment: String,
prfFirst: String,
prfSecond: String,
}
}));
module.exports = storage;