My gRPC server application needed to extract a JWT token from each request being made by a Javascript client. The JWT itself arrived at the application by means of the request metadata (basically as a request header), in the format: Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzIiO... I created a ServerInterceptor to extract the JWT from the metadata: import … Continue reading gRPC interceptor for extracting a JWT token→

Having recently had to modify Selenium Wire to properly support proxy server authentication with Python's http.client.HTTPConnection and http.client.HTTPSConnection, I thought I'd summarise how I did that here, in case it's useful to anybody in future. These examples assume you're working with a proxy server that's using Basic Authentication. This authentication method works by sending a … Continue reading Proxy authentication with HTTPConnection and HTTPSConnection→

Recently I was trying to pip install pymssql on Centos 7, but was hitting: _mssql.c:266:22: fatal error: sqlfront.h: No such file or directory That error happened when pip tried to compile the driver after it had downloaded the relevant files. The issue was due to the libraries freetds and freetds-devel not being installed on the … Continue reading Centos 7: No package freetds available→

It seems this is a common mistake when working with KnockoutJS. Developers, myself included, have spent plenty of time scratching our heads over why a drop-down, or other list-based page element, doesn't dynamically update when items are pushed into an observableArray. When you’re regularly working with observables, you get into a habit of calling the … Continue reading KnockoutJS: UI does not update when using observableArray→

With our container-based architecture, I knew that introducing a Redis broker ought to be straightforward with Docker, but I had no idea how incredibly easy it would turn out to be. The hardest part was getting past our corporate proxy server.