How to program an arcball (orbiting) camera in C++ and OpenGL

I recently had to implement a drag and drop camera feature for a college course. The OpenGL program, we had to submit, had to contain a camera that can be controlled by moving the mouse around. The camera itself should always look at a fixed point in the 3D space while being rotated on two different axes like it was stuck to the inside of a sphere.

Continue reading How to program an arcball (orbiting) camera in C++ and OpenGL

A simple universal 800×600 VGA signal generation circuit

You may have seen this article where I discussed a 640×480 VGA signal generator that I designed and built. The signals, that circuit generated, were correct when measured with an oscilloscope. However, I concluded that I didn’t know why my display hardware had a hard time displaying an image and I found the reason for that and updated the circuit to generate the necessary signals for displaying an 800×600 image with a refresh rate of 60 Hertz.

Continue reading A simple universal 800×600 VGA signal generation circuit

Native real-time and multithreaded programming on the Arduino Nano 33 BLE (Mbed OS)

A long time ago, I released a series about real-time programming on a BeagleBone Black. I then decided to use the BBB to control the CRT display of an old Macintosh Classic computer. As you can imagine, I was thrilled when the new Arduino Nano series with built-in real-time capabilities was announced and in this article, I’d like to revisit the old topic and discuss what has changed over the years.

Continue reading Native real-time and multithreaded programming on the Arduino Nano 33 BLE (Mbed OS)

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

In this last part of the series, I’ll show you, how you can implement a token renewal mechanism. This is necessary, because the JWTs, issued by the backend, expire after a certain amount of time. This means, that logged in users can not authenticate themselves once the JWTs expired. To prevent this from happening, the frontend will automatically request a new token from the server shortly before the old one expires as long as the user is logged in and the browser window is not closed.

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

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

Now that we’ve secured the backend with Spring security and implemented the basic JWT features, it’s time to allow users to log in from a user interface. In this example, I’ll show you how to implement a very basic authentication form in an Angular frontend. The pages, that may only be visited by authenticated users, will be protected by a special guard. For that purpose, I’ll show you how to implement such a guard and how to use the Angular router to redirect unauthenticated users to the login page.

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

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

In this part of the series we’ll look at the most complex part of the project: Generating, reading, and validating JWT tokens. Our backend server will issue a token and return it to a requesting user. When a user tries to access a restricted resource, the token gets validated and, if the user is permitted, the resource can be accessed.

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