MCPcopy Create free account
hub / github.com/ampproject/amphtml / getAuthdataField

Method getAuthdataField

extensions/amp-access/0.1/amp-access.js:423–432  ·  view source on GitHub ↗

@override from AccessVars

(field)

Source from the content-addressed store, hash-verified

421
422 /** @override from AccessVars */
423 getAuthdataField(field) {
424 if (!this.enabled_) {
425 return null;
426 }
427 return this.lastAuthorizationPromises_.then(() => {
428 const responses = this.combinedResponses();
429 const v = getValueForExpr(responses, field);
430 return v !== undefined ? v : null;
431 });
432 }
433
434 /**
435 * @param {!Document|!ShadowRoot|!Element} root

Callers

nothing calls this directly

Calls 3

combinedResponsesMethod · 0.95
getValueForExprFunction · 0.90
thenMethod · 0.45

Tested by

no test coverage detected