OauthApplication.js 513 B

1234567891011121314151617181920212223242526
  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. pkceEnabled: Boolean,
  12. },
  13. {
  14. collection: 'oauthApplications',
  15. minimize: false,
  16. }
  17. )
  18. exports.OauthApplication = mongoose.model(
  19. 'OauthApplication',
  20. OauthApplicationSchema
  21. )
  22. exports.OauthApplicationSchema = OauthApplicationSchema