Basic authentication is the simplest technique for authenticating HTTP requests. The client
Authorization header with a Base64-encoded string of
username:password, prefixed by
Basic. For example,
to authenticate as
Authorization: Basic ZGVtby9zM2NyM3Q=
Martini supports basic authentication out-of-the-box, albeit disabled by default. Base64 is easily decoded, hence you should only enable this with HTTPS/SSL configured on your instance.
You can enable basic authentication via the application property:
For changes to take effect, a restart is required
For Martini to pick up the
api.basic.auth's new value, an instance restart must be applied first.