URL login

You can generate a permalink of your application to give a user direct access to protected data.

First, you should configure urllogin in the vars file:

urllogin:
    aes_key: foobarfoobar1234

The AES key must be either 16, 24, or 32 bytes long.

To generate a key, you can use the urllogin command: ./docker-compose-run urllogin --help. This generates a token like: auth=148b60cc... that you can add in the query string of the permalink.

When the user uses this link, s/he will be connected as a normal user, therefore you should be sure that the session timeout is not too big.

You can change the session timeout in the vars file with:

authtkt:
    # in second => One day
    timeout: 86400

How to build your token in your application

The content of the token is a json like this:

{
    u: <username>,
    p: <password>,
    t: <timestamp> // end of validity in second
}

This content is then encrypted in AES with the provided key, and encoded in hexadecimal.