Skip to Main Content

Micro Services

Laboratory for Computer Science Research

The applications in the stack can be deployed in conjunction, but they are designed to run as isolated systems.

Each application runs on a modern version of PHP (8.1). Both applications require a MySQL backing database.

Installation

The installation of both applications is very similar.

  1. Clone the repository for the required application into a directory accessible by the web server (Apache 2 is recommended).
  2. Set the web server’s root directory for the site to the “public” directory of the app.
  3. Copy the provided “.env.sample” file into a “.env” file. This will store sensitive information
  4. Create a new database within MySQL. Note the name.
  5. Configure the MySQL database in the “.env” file. Reference the previously created database.
  6. In the project root, execute “php artisan key:generate”. This will generate a new secret key which is used for cryptographical operations.

Configuration

The applications currently utilize several commands to generate data which would normally be created in the management UI… these commands are documented below.

 

LCSR Identity Services

php artisan auth:newtoken

Description:
Generate a new API authentication (AppToken) token for the given app registration

Usage:
auth:newtoken

Arguments:
appId – The application (by ID) to generate a new token for.

php artisan auth:newapp

Description:
Generate a new app registration with the given name and initial callback URL

Usage:
auth:newapp [options] [–]

Arguments:
appName The app name
appCallback The initial callback URL

Options:
-t, –token Whether a token (AppToken) should be generated

LCSR Authorization Services

php artisan authz:newtoken

Description:
Generate a new API authentication (AppToken) token for the given app registration

Usage:
authz:newtoken <appId>

Arguments:
appId – The application (by ID) to generate a new token for.