You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
549 B
18 lines
549 B
// oauth2-access-token.js
|
|
// Copyright (C) 2022 DTP Technologies, LLC
|
|
// License: Apache-2.0
|
|
|
|
'use strict';
|
|
|
|
const mongoose = require('mongoose');
|
|
|
|
const Schema = mongoose.Schema;
|
|
|
|
const OAuth2AccessTokenSchema = new Schema({
|
|
token: { type: String, required: true, unique: true, index: 1 },
|
|
user: { type: Schema.ObjectId, required: true, index: 1 },
|
|
clientId: { type: Schema.ObjectId, required: true, index: 1 },
|
|
scope: { type: [String], required: true },
|
|
});
|
|
|
|
module.exports = mongoose.model('OAuth2AccessToken', OAuth2AccessTokenSchema);
|