exports = module.exports = function(negotiateFormat, negotiateType, tokens) {
  
  return function issueToken(claims, audience, presenter, options, cb) {
    console.log('ISSUE TOKEN!');
    console.log(claims);
    
    if (typeof options == 'function') {
      cb = options;
      options = undefined;
    }
    options = options || {};
    
    // FIXME:
    claims.audience = audience;
    
    negotiateType(audience, presenter, function(err, topts) {
      if (err) { return cb(err); }
      
      
    negotiateFormat(claims.audience, function(err, copts) {
    console.log(copts);
    
    
    copts.dialect = options.dialect || copts.dialect;
    copts.confidential = false;
    copts.audience = claims.audience;
    
    //copts.type = 'http://schemas.modulate.io/tokens/jwt/twilio';
    //copts.dialect = 'http://schemas.modulate.io/tokens/jwt/twilio';
    
    tokens.encode('access', claims, copts, function(err, token) {
      if (err) { return cb(err); }
      return cb(null, token);
    });
    });
    }); // negotiateType
  };
};

exports['@implements'] = 'http://schemas.authnomicon.org/js/aaa/oauth2/util/issueToken';
exports['@require'] = [
  './negotiate/content',
  './negotiate/type',
  'http://i.bixbyjs.org/security/tokens'
];

@@ -495,32 +495,34 @@
     %0A      %0A    
+  
 negotiateFormat(
@@ -569,28 +569,45 @@
     
-console.log(copts);%0A
+    if (err) %7B return cb(err); %7D%0A    
     
@@ -607,25 +607,24 @@
        %0A    
-%0A
     copts.di
@@ -665,24 +665,28 @@
 ialect;%0A    
+  
+  
 copts.confid
@@ -701,16 +701,20 @@
  false;%0A
+    
     copt
@@ -748,24 +748,28 @@
 e;%0A    %0A    
+ 
+   
 //copts.type
@@ -819,24 +819,28 @@
 wilio';%0A    
+   
+ 
 //copts.dial
@@ -894,24 +894,28 @@
 ilio';%0A    %0A
+    
     tokens.e
@@ -966,32 +966,36 @@
  token) %7B%0A      
+  
+  
 if (err) %7B retur
@@ -1003,24 +1003,28 @@
  cb(err); %7D%0A
+    
       return
@@ -1041,16 +1041,20 @@
 token);%0A
+    
     %7D);%0A
@@ -1053,27 +1053,48 @@
     %7D);%0A    
+  
 %7D);
+ // negotiateFormat
 %0A    %7D); // 

Clean up.