### Run Play Framework Sample Application Source: https://github.com/jamesward/play-rest-security/blob/master/README.md To start the Play Framework sample application locally, navigate to the `play-rest-security` directory and execute this command using Typesafe Activator. The application will then be accessible in your browser at `http://localhost:9000/`. ```Shell activator run ``` -------------------------------- ### Run Play Framework Application Tests Source: https://github.com/jamesward/play-rest-security/blob/master/README.md To execute the functional and unit tests for the Play Framework application, navigate to the `play-rest-security` directory and run this command using Typesafe Activator. These tests validate the application's security. ```Shell activator test ``` -------------------------------- ### SPA and REST Service Authentication Flow Source: https://github.com/jamesward/play-rest-security/blob/master/README.md Describes the step-by-step authentication process for Single Page Applications interacting with REST services, leveraging cookies for initial token storage and custom HTTP headers for subsequent requests to mitigate CSRF vulnerabilities. ```APIDOC 1. The user navigates in their browser to the application 2. The server returns a basic web page and a JavaScript application 3. The JavaScript application can't find an authentication token in the web site's cookies 4. The JavaScript application displays a login form 5. The user enters correct login credentials and then submits the form 6. The server validates the login information and creates an authentication token for the user 7. The server sets the authentication token in a cookie and returns it to the JavaScript application ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.