Skip to content

Commit

Permalink
Merge pull request #3 from bc-ticketing/develop
Browse files Browse the repository at this point in the history
Added Example docker-compose
  • Loading branch information
SpielmannCode authored Dec 3, 2020
2 parents e25da47 + f2c1b3d commit ac00714
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,80 +7,7 @@ This Spring boot application is the backend of our access control implementation
To do this, he will be prompted with a random string. He then needs to sign this string using the eth address holding the tickets.
This will proof ownership of the address.

### Implementation

#### Terminal Part

The String will be presented as a QR code. This will be done by our terminals. These terminals interact via the following way:

Following is the representation of Terminal in the backend:

| Type | Name | Description | Annotation |
|---------------|-----------------|---------------------------------------------------------------------|--------------------------------|
| UUID | terminalID | unique identifier of the terminal | auto generated |
| String | randID | Random Value presented to guest to sign | current length 42 |
| List<String> | ticketType | List of ticket types required to access area controlled by terminal | empty list if general entrance |
| String | areaAccessTo | Area the guest is in, after he passed this terminal | |
| int | numberOfTickets | Number of Tickets per Request | |
| RequestStatus | requestStatus | flag to save whether a response has been done to this randID | PENDING,GRANTED,DENIED |


A Terminal uses the following Post to register :

| Parameter | Value |
|-------------------------|-------------------------------------------------------------------------|
| URL | "/registerTerminal" |
| String secret | secret Token to add terminal |
| List<String> ticketType | ticket type required to access the area (empty list if general access) |
| | |
| Return | terminalID |

Response is the terminal Entity

Whenever a terminal has been registered, an initial random string has been generated. The terminal can then display this string.

At the same time, it should start querying following request:

| Parameter | Value |
|-----------------|-----------------------------|
| URL | "/getTerminalStatus" |
| UUID terminalId | terminal ID of the terminal |
| | |
| Return | requestStatus |

This will return the terminal Entity.
As already described, the guest will submit a post request with the signed data.
This will set the boolean responseDone of the terminal entity to true.

The backend will evaluate, whether the guest has a valid ticket.
When the guest has authorization to access, the boolean accessAllowed will be set to true.

Once the responseDone flag changes, the Terminal will have to show the access status.

After that, the terminal can request a new random string via this post:

| Parameter | Value |
|-----------------|-----------------------------|
| URL | "/NewSecretCode" |
| UUID terminalId | terminal ID of the terminal |
| | |
| Return | randID |

This will save the guest as accessed to the area the terminal grants access to and return a new random string.

Here the process starts from the beginning.

To unregister a terminal, use:

| Parameter | Value |
|-----------------|-----------------------------|
| URL | "/unRegisterTerminal" |
| UUID terminalId | terminal ID of the terminal |
| | |
| Return | boolean |


#### Guest Part



0 comments on commit ac00714

Please sign in to comment.