f5e12d2cae94ca3e79db09204d7297dec42740cc
API to check for Maths students
Server Prerequisites
- Having
goinstalled - An environment variable
AUTHPDS_TOKENcontaining the authentication token for the external API. - An environment variable named
SECRETcontaining the secret token for authorization.
Server Setup
- Clone the repository:
git clone https://git.phc.dm.unipi.it/phc/go-maths-api - Change directory and build the project:
cd go-maths-api go build - Run with
./go-maths-api
Client Usage
An example request (with SECRET defined in your environment):
curl -X GET "http://localhost:8080/check-maths-user?SANITIZED_USER=f.minnocci" -H "Authorization: Bearer $SECRET"
Successful JSON response:
{
"result": true
}
Languages
Go
93.8%
Dockerfile
6.2%