Auth and OAuth2

The util-simple-auth and util-oauth2 Foxx services have been replaced withthe Foxx auth andFoxx OAuth2 modules. It is no longer necessary to install theseservices as dependencies in order to use the functionality.

Old:

  1. 'use strict';
  2. const auth = applicationContext.dependencies.simpleAuth;
  3. // ...
  4. const valid = auth.verifyPassword(authData, password);

New:

  1. 'use strict';
  2. const createAuth = require('@arangodb/foxx/auth');
  3. const auth = createAuth(); // Use default configuration
  4. // ...
  5. const valid = auth.verifyPassword(authData, password);