Add BasicAuth in SparkJava Webapp
In this post, I am going to show you how to add Basic Authentication to your SparkJava webapp in Kotlin. Spark Java : Its a micro-framework for creating web applications in Kotlin and Java 8 with minimal effort. Basic Authentication : Its simply an Authorization header whose value is Basic base64encode(usename:password) So if username and password is admin and admin. Base64 encoding of admin:admin is YWRtaW46YWRtaW4= Value of header will be...