Retrieve OAuth 2.0 authorization code using JavaFX WebView


This post documents a snippet of code that can be added to Browser class in JavaFX WebView sample, to extract OAuth 2.0 authorization code.

Assuming you’ve configured WebView’s WebEngine to load the authorization URL, the authorization service will redirect you to the redirect_uri specified in the authorization URL, after a user logs in successfully. It will pass along the code parameter, that can be extracted as follows

JSON syntax highlighting in ScintillaNET


I am studying the excellent ScintillaNET code editing component, to enable basic JSON editing in a .NET application.

Inspired by the C# code highlighting example, here’s the code snippet to enable basic JSON syntax highlighting

net-scintilla-json.png

Run Buildroot on Ubuntu with Docker


Follow the getting started to install Docker. I prefer using Docker in the PowerShell prompt on Windows 10.

To download ubuntu image, and start a new container with bash shell

docker run -it ubuntu bash

From another command prompt, run the following to find container id

docker ps -l

Add the -a option to see all containers, even those that are stopped.

To exit bash shell and stop container, type exit. To return to the container created earlier

docker start container_id
docker attach container_id

Hit enter once or twice to see the bash shell.

Update apt-get package cache

apt-get update

You should now be able to search for and install your favorite missing tools

apt-cache search wget
apt-get install wget

Obtain and untar Buildroot

wget https://buildroot.org/downloads/buildroot-2016.11.2.tar.gz
tar xvzf buildroot-2016.11.2.tar.gz

Install other core dependencies

apt-get install patch cpio python unzip rsync bc bzip2 ncurses-dev git g++

docker-ubuntu-windows-10.PNG

Go ahead and build your Linux system.