This module allows authentication via an API Key in Play! Framework 1 REST applications.
require:
- apikey -> apikey 1.1.0
repositories:
- apikey:
type: http
artifact: "http://release.sismics.com/repo/play/[module]-[revision].zip"
contains:
- apikey -> *
Add the following header to your HTTP requests:
Authentication: Token THE_API_KEY
Extend the class ApiKeySecure.Security and implement the authenticate
method.
Add the following annotations to secure your controllers:
@With(ApiKeySecure.class)
public class MyThings extends Controller {
@CheckApiKey
public static void listThings() {
// ...
}
}
This software is released under the terms of the Apache License, Version 2.0. See LICENSE
for more
information or see https://opensource.org/licenses/Apache-2.0.