- available_data = dict([
- (t, axargs["value.%s.1" % s]) for t, s in available_types.items()
- ])
+ ax_schema = getattr(self, 'dataype2ax_schema', False)
+
+ if ax_schema:
+ ax = AXFetchResponse.fromSuccessResponse(openid_response)
+
+ axargs = ax.getExtensionArgs()
+
+ ax_schema2data_type = dict([(s, t) for t, s in ax_schema.items()])
+
+ available_types = dict([
+ (ax_schema2data_type[s], re.sub('^type\.', '', n))
+ for n, s in axargs.items() if s in ax_schema2data_type
+ ])
+
+ for t, s in available_types.items():
+ if not t in consumer_data:
+ consumer_data[t] = axargs["value.%s.1" % s]