OauthApplication.js 466 B

123456789101112131415161718192021222324
  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. }
  15. )
  16. exports.OauthApplication = mongoose.model(
  17. 'OauthApplication',
  18. OauthApplicationSchema
  19. )
  20. exports.OauthApplicationSchema = OauthApplicationSchema