All files / src/schemas AuthorizationCodeSchema.js

100% Statements 3/3
100% Branches 0/0
100% Functions 0/0
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59      1x         1x                                                                                                 1x  
/**
 * Dependencies
 */
const {JSONSchema} = require('@trust/json-document')
 
/**
 * AuthorizationCodeSchema
 */
const AuthorizationCodeSchema = new JSONSchema({
  properties: {
    code: {
      type: 'string'
    },
 
    sub: {
      type: 'string'
    },
 
    aud: {
      type: 'string'
    },
 
    redirect_uri: {
      type: 'string',
      format: 'uri'
    },
 
    exp: {
      type: 'integer'
    },
 
    max: {
      type: 'integer'
    },
 
    scope: {
      type: 'string'
    },
 
    nonce: {
      type: 'string'
    }
 
    // expires_at
    // client_id
    // redirect_uri
    // max_age
    // user_id
    // scope
    // used
    // nonce
  }
})
 
/**
 * Export
 */
module.exports = AuthorizationCodeSchema