Giter VIP home page Giter VIP logo

drivenpass-api's Introduction

readme-logo

DrivenPass

Password Manager

Usage

$ git clone https://github.com/frreiro/drivenPass-API

$ cd drivenPass-API

$ npm install

$ npm run dev

SignUp / Login :

- POST /sign-up
    - Rota para cadastrar um novo usuário
    - headers: {}
    - body: {
        "email": "[email protected]",
        "senha": "loremipsum"
    }
- POST /sign-in
    - Rota para fazer login
    - headers: {}
    - body: {
    "email": "[email protected]",
    "senha": "loremipsum"
    }

You can see the rules here

Credentials

- POST /credentials (autenticada)
    - Rota para criar uma credencial do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {
        "title": "Lorem ipsum2",
        "url": "https://...com",
        "username": "loremipsum",
        "password": "loremipsum123456",
    }
- GET /credentials (autenticada)
    - Rota para listar todas as credenciais do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {}
- GET /credentials/:id (autenticada)
    - Rota para listar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}
- DELETE /credentials/:id (autenticada)
    - Rota para deletar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

You can see the rules here

Cards

- POST /cards (autenticada)
    - Rota para criar uma credencial do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {
        "title": "Lorem ipsum2",
        "number": "1234 5678 9101 1121",
        "cardHolderName": "Lorem I Psum",
        "securityCode": "123",
        "expirationDate": "05/25",
        "password": "1234",
        "isVirtual": true/false,
        "type": "debit" / "credit" / "debit_credit",
    }

- GET /cards (autenticada)
    - Rota para listar todas as credenciais do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

- GET /cards/:id (autenticada)
    - Rota para listar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

- DELETE /cards/:id (autenticada)
    - Rota para deletar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

You can see the rules here

Notes

- POST /notes (autenticada)
    - Rota para criar uma credencial do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {
        "title": "Lorem ipsum2",
        "note": "loremipsum"
    }

- GET /notes (autenticada)
    - Rota para listar todas as credenciais do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

- GET /notes/:id (autenticada)
    - Rota para listar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}
    
- DELETE /notes/:id (autenticada)
    - Rota para deletar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

You can see the rules here

Wifi

- POST /wifi (autenticada)
    - Rota para criar uma credencial do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {
        "title": "Lorem ipsum2",
        "ssd": "loremipsum",
        "password": "loremipsum2"
    }

- GET /wifi (autenticada)
    - Rota para listar todas as credenciais do usuário
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

- GET /wifi/:id (autenticada)
    - Rota para listar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}
    
- DELETE /wifi/:id (autenticada)
    - Rota para deletar uma credencial do usuário pelo id
    - headers: { "Authorization": "Bearer $token" }
    - body: {}

Rules

Authenticate Rules

  • Password must have at least 10 characters.
  • Email must be an valid email.

Credentials Rules

  • Title must have maximum 50 characters.
  • Url must be an valid url.
  • Username do not have specific rules.
  • Password do not have specific rules.

Notes Rules

  • Title must have maximum 50 characters.
  • Note must have maximum 1000 characters.

Wifi Rules

  • Title must have maximum 50 characters.
  • SSD do not have specific rules.
  • Password do not have specific rules.

Cards Rules

  • Title must have maximum 50 characters.
  • Number must follow the exemple with blank spaces.
  • CardHolderName do not have specific rules.
  • SecurityCode it is a string and must have length equals 3.
  • ExpirationDate it is a string and must follow the exemple, with MM/YY.
  • Password it is a string and must have length equals 4.
  • IsVirtual it is a boolean
  • Type it is a string, must be "debit", "credit" or "debit_credit".

Back to the top

drivenpass-api's People

Contributors

frreiro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.