Authentication library for Spark - included:
Configure basic authentication for your given path(s):
before(new BasicAuthenticationFilter("/path/*", new AuthenticationDetails("expected-username", "expected-password")));
Library available from Maven central repository
<dependency>
<groupId>com.qmetric</groupId>
<artifactId>spark-authentication</artifactId>
<version>${VERSION}</version>
</dependency>