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.

12345678910111213141516171819202122
  1. 'use strict';
  2. module.exports = (options) => {
  3. return {
  4. keys: {
  5. key: options.jwtKey,
  6. algorithms: ['HS256']
  7. },
  8. verify: {
  9. aud: false,
  10. iss: false,
  11. sub: false
  12. },
  13. httpAuthScheme: 'Token',
  14. validate: (artifacts, request, h) => {
  15. return {
  16. isValid: true,
  17. credentials: { user: artifacts.decoded.payload.user }
  18. }
  19. }
  20. }
  21. }