[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Google Auth Library Client - Class ProxyAuthTokenMiddleware (1.47.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.47.1 (latest)](/php/docs/reference/auth/latest/Middleware.ProxyAuthTokenMiddleware)\n- [1.47.0](/php/docs/reference/auth/1.47.0/Middleware.ProxyAuthTokenMiddleware)\n- [1.46.0](/php/docs/reference/auth/1.46.0/Middleware.ProxyAuthTokenMiddleware)\n- [1.45.2](/php/docs/reference/auth/1.45.2/Middleware.ProxyAuthTokenMiddleware) \nReference documentation and code samples for the Google Auth Library Client class ProxyAuthTokenMiddleware.\n\nProxyAuthTokenMiddleware is a Guzzle Middleware that adds an Authorization header\nprovided by an object implementing FetchAuthTokenInterface.\n\nThe FetchAuthTokenInterface#fetchAuthToken is used to obtain a hash; one of\nthe values value in that hash is added as the authorization header.\n\nRequests will be accessed with the authorization header:\n\n'proxy-authorization' 'Bearer\n\n\nNamespace\n---------\n\nGoogle \\\\ Auth \\\\ Middleware\n\nMethods\n-------\n\n### __construct\n\nCreates a new ProxyAuthTokenMiddleware.\n\n### __invoke\n\nUpdates the request with an Authorization header when auth is 'google_auth'.\n\nuse Google\\\\Auth\\\\Middleware\\\\ProxyAuthTokenMiddleware;\nuse Google\\\\Auth\\\\OAuth2;\nuse GuzzleHttp\\\\Client;\nuse GuzzleHttp\\\\HandlerStack;\n\n$config = \\[..\n\n\n$client = new Client(\\[\n'handler' =\\\u003e $stack,\n'base_uri' =\\\u003e '\u003chttps://www.googleapis.com/taskqueue/v1beta2/projects/\u003e',\n'proxy_auth' =\\\u003e 'google_auth' // authorize all requests\n\\]);\n\n$res = $client-\\\u003eget('myproject/taskqueues/myqueue');"]]