overleaf/services/web/app/src/models/SamlLog.js
Jessica Lawshe f1ee27a518 Merge pull request #9074 from overleaf/jel-saml-log-tests
[web] Add tests for SAML log

GitOrigin-RevId: 7bc5b25461063b32d3471b7f4ab966f2caa4e70c
2022-08-09 08:03:05 +00:00

21 lines
582 B
JavaScript

const mongoose = require('../infrastructure/Mongoose')
const { Schema } = mongoose
const SamlLogSchema = new Schema(
{
createdAt: { type: Date, default: () => new Date() },
data: { type: Object },
jsonData: { type: String },
path: { type: String },
providerId: { type: String, default: '' },
samlAssertion: { type: String },
sessionId: { type: String, default: '' },
userId: { type: String, default: '' },
},
{
collection: 'samlLogs',
}
)
exports.SamlLog = mongoose.model('SamlLog', SamlLogSchema)
exports.SamlLogSchema = SamlLogSchema