How to implement JWT authentication in Spring Security and Angular – Part 2

In this part of the series we’ll make sure that Spring Security restricts access to certain resources and uses our custom bearer token authorization method to allow authenticated users to access resources.

Continue reading How to implement JWT authentication in Spring Security and Angular – Part 2

How to implement JWT authentication in Spring Security and Angular – Part 1

I recently had to implement a bearer token authentication mechanism in a Spring backend and an Angular frontend. I wasn’t surprised to see that there are already a lot of tutorials around, however, I was shocked by how poorly most of them are written and how bad some solutions were. Now, don’t get me wrong: By no means do I want to claim that my solution is the state-of-the art single way to go. However, this has worked for me and I think it’s much easier to understand and follow than other guides. Additionally, there are a few things that almost all tutorials get wrong and I’ll try to address these as well.

Continue reading How to implement JWT authentication in Spring Security and Angular – Part 1

How to use Websockets to control an ESP8266 and a Raspberry Pi with a web browser

For a current project of mine, I had to evaluate how high the latency is when using websockets. In my case, I wanted to use a small single board computer as the server and any device, that can run a web browser, as the client. This tutorial illustrates how a Raspberry Pi and an ESP8266 can be used to act as a websocket server that can be controlled with a standard webbrowser.

Continue reading How to use Websockets to control an ESP8266 and a Raspberry Pi with a web browser

How to use the ESP8266 for wireless communication

More than often enough parts of projects will have to communicate with each other or external devices. This can either be done by directly connecting the devices with cables but sometimes it’s more convenient to wirelessly connect the different pieces of hardware. This article will show you how to use the ESP8266 and it also includes two examples for using it with a Raspberry Pi and Arduino boards.

Continue reading How to use the ESP8266 for wireless communication

How to use an EEPROM to permanently store data with your Arduino

Some Arduino boards have a built-in EEPROM that can be written to and read from in your programs. I not only want to discuss how that’s possible but I also want to show you an alternative while talking about EEPROMs and memory in general.

Continue reading How to use an EEPROM to permanently store data with your Arduino

Low latency and high FPS camera stream with a Raspberry Pi

I just saw that two very good sources, that both had an article about this topic, have gone offline without an archived version. And because I continued my work on a robot that is controlled by a Raspberry Pi, I had to figure out how to create a low latency and high FPS stream from the Pi’s camera that can be viewed in a web browser again.

Continue reading Low latency and high FPS camera stream with a Raspberry Pi

Read smartphone accelerometer data on a website

Almost everybody has one nowadays: A smartphone. But how often did you come across a website that used the phone’s tilt sensor? More than often enough a website only changes the layout if tilt your phone. How cool would it be, if the background would move around slightly when you tilt the phone? This short article will show you how to read the phone sensors and how to process the data with JavaScript!

An updated guide for iOS 13 and phones, that support the Permissions API, is available here!

Continue reading Read smartphone accelerometer data on a website