code: function (auth, request, done) {
          var result,
              params = auth.get([
                  'authId',
                  'authKey',
                  'algorithm',
                  'nonce',
                  'timestamp',
                  'extraData',
                  'app',
                  'delegation',
                  'user'
              ]),
              contentType = request.headers.get('content-type'),
  
              // force toString to add a protocol to the URL.
              url = urlEncoder.toNodeUrl(request.url.toString(true)),
  
              self = this;
  
          if (!params.authId || !params.authKey) {
              return done(); // Nothing to do if required parameters are not present.
          }
  
          request.removeHeader('Authorization', {ignoreCase: true});
  
          computeBodyHash(request.body, params.algorithm, 'base64', contentType, function (bodyHash) {
              result = self.computeHeader({
                  credentials: {
                      id: params.authId,
                      key: params.authKey,
                      algorithm: params.algorithm
                  },
                  nonce: params.nonce,
                  timestamp: params.timestamp,
                  ext: params.extraData,
                  app: params.app,
                  dlg: params.delegation,
                  user: params.user,
                  url: url.href, // force toString to add a protocol to the URL.
                  method: request.method,
                  hash: bodyHash
              });
              request.addHeader({
                  key: 'Authorization',
                  value: result,
                  system: true
              });
  
              return done();
          });
      }
docs: Signs a request.
  
  @param {AuthInterface} auth
  @param {Request} request
  @param {AuthHandlerInterface~authSignHookCallback} done