This is an old revision of the document!


Form Authentication

The default authentication method of blocks is internalDigest, which doesn't support logout. Sometimes projects may call for a slightly more sophisticated method of authentication. This article describes how to set up blocks with the form authentication method.

First of all, stop the server and then follow this guide to set up blocks with a https certificate. Then add the following lines inside the server top level server item in the configuration (YML) file.

:!: IMPORTANT: There's an indent of two spaces for the auth item, so it becomes nested under your server item.

  auth:
    servlet:
      security:
        - matchers: internalMatcher
          authorizers: isAuthenticated
          clients: internalForm
          #the above uses form authentication, which supports log-out. The default otherwise is internalDigest, which doesn't

Start the server again and you should now see a slightly differnet login prompt like in this image.

And here you will find the logout option: