# Example #5

## Setup

TODO

## How it works

This example is similar to #4 but features a registration page for user registration instead of automatic user creation.  The properties that are
received from the authentication provider (in this case, Keycloak) are provided to the registration page so that you can prepopulate the form.

The registration form is provided as `/registration.html`.

The registration process requires a session.  The session is configured in app.js.

Any user profile information acquired from the handshake with the authentication provider is available in a session variable:
    req.session.registration_user_object
    
You can use this information to pre-populate the form.

It posts to `/register` which is an internal route that the Cloud CMS application server provides.  This route can be configured in the
`registration` block.


## JWT Cookie

This example uses the same unencrypted JWT cookie configuration from example #4.  The same two methods are available to set things up:

    /cookie/create
    /cookie/delete
    
One difference is that the /cookie/delete call also deletes the user.  That way, you can test out the registration form repeatedly by 
deleting the cookie and user with a single click.