Posts containing "java"
Spring JWT with RSA (asymmetric encryption algorithm)
Let's say we have an "auth server" that signs tokens for us and a "resource server" where we store some pretty sensitive data. We trust the auth server and we want to validate that the JWT we get indeed comes from that trusted auth server. In other words, how can we be sure that the guy who wants to detonate our printers is using a JWT that is from that very auth server?
How are Scala Implicits more explicit than Java Generics?
This blogpost will show you how implicits can solve problems arising from/because of type erasure, proving that Scala implicits sometimes are more explicit than Java generics All of these code snippets can be copy-pasted to the REPL. Some of the require-s will fail, those are just to demonstrate the expected work without the need...
Speed Recommendation for Keeping and Manipulating Objects
It is often the case at Wanari that we need to convert objects of one kind to become objects of another kind. This happens because we use different models in the different levels of an application. The question obviously came up: how should we do this? Does it matter what kind of a collection we...
Deploying a Play! app to Azure via Jenkins
Here at Wanari, we use Play Framework for many of our projects and maintain products on our own servers. Not too long ago, a client of ours requested to move such product to Azure Cloud. After a bit of research we found 3 options: We create a Virtual Machine on which we arrange the environment we use on...
Java8 orElse versus orElseGet – easily misused
So, the Java8 Optional has two really cool (and similar) functions: the orElse() and the orElseGet(). If we quickly read the javadoc for each, we will only see a small difference; one of them has a T type as a parameter and the other has a function which must return with T (as a parameter).