stolsma/authpack — Issue #3: multiple response types
Author: mwawrusch
Created: 2011-12-28 18:38:37+00:00
State: open

more of a question. I do not completely understand the behavior if multiple response_types are requested, and what this code here does:

// Handle the different registered grant types, see 1.3/3.1.1 of OAuth2 Specs.
var rt = self.responseTypes;
for (var i=0; i < rt.length; i += 2) {
if (rt[i][0] === options.response_type) return rt[i+1](req, res, options);
}

A bit more explanation in the source would be great.