OauthApplication.js 487 B

12345678910111213141516171819202122232425
  1. const mongoose = require('../infrastructure/Mongoose')
  2. const { Schema } = mongoose
  3. const OauthApplicationSchema = new Schema(
  4. {
  5. id: String,
  6. clientSecret: String,
  7. grants: [String],
  8. name: String,
  9. redirectUris: [String],
  10. scopes: [String],
  11. },
  12. {
  13. collection: 'oauthApplications',
  14. minimize: false,
  15. }
  16. )
  17. exports.OauthApplication = mongoose.model(
  18. 'OauthApplication',
  19. OauthApplicationSchema
  20. )
  21. exports.OauthApplicationSchema = OauthApplicationSchema