Skip to content

Toro Cloud Dev Center


Basic authentication

Basic authentication is the simplest technique for authenticating HTTP requests. The client sends an Authorization header with a Base64-encoded string of username:password, prefixed by Basic. For example, to authenticate as demo/s3cr3t:

1
Authorization: Basic ZGVtby9zM2NyM3Q=

Configuration

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:

1
api.rest.enable-basic-authentication=true

For changes to take effect, a restart is required

For Martini to pick up the api.rest.enable-basic-authentication's new value, an instance restart must be applied first.