Skip to content

Latest commit

 

History

History
90 lines (74 loc) · 2.03 KB

README.md

File metadata and controls

90 lines (74 loc) · 2.03 KB

Golang API for credentials storage: "passguardian"

gopher

Tech Stack

  • Go
  • Gin
  • MongoDB
  • Postman

Introduction

The purpose of this API is to learn how synchronous cryptography works in practice, taking into account the Information Security and Introduction to Computer Programming classes at my Computer Science university, which cover these topics using the C language, which is similar to Golang.

API Endpoints

route description
GET /login-credentials retrieves user credentials see response details
POST /login-credentials create user credentials see request details
GET /credentials/:id retrieves credential by id see response details
DELETE /credentials/:id deletes credential by id see response details

GET /login-credentials

RESPONSE

{
  "serviceName": "GitHub",
  "user": "Golango",
  "password": "mypassword432 <- (decrypted)"
}
{
  "serviceName": "Instagram",
  "user": "Pythoneiro",
  "password": "senhona426 <- (decrypted)"
}

POST /login-credentials

REQUEST

{
  "serviceName": "Twitch",
  "user": "Java Scripto",
  "password": "mypassword123 <- (encrypted)"
}

RESPONSE

{
  "message": "Credential saved successfully!"
}

GET /credentials/:id

REQUEST

{
  "id": "6716baed4f1c6829e2ab9cbe"
}

RESPONSE

{
  "serviceName": "Instagram",
  "user": "Pythoneiro",
  "password": "senhona426 <- (decrypted)"
}

DELETE /credentials/:id

REQUEST

{
  "id": "6716baed4f1c6829e2ab9cbe"
}

RESPONSE

{
  "message": "Credential deleted successfully!"
}