Skip to content

MohAlkurdi/Authficate-API

Repository files navigation

Authficate API

An API built using Laravel to manage certificates.

Table of Contents

Introduction

Certificate Authentication API, a robust and versatile API developed using Laravel. This API is your solution for managing certificate authentication with ease.

Prerequisites

  • PHP 8.2
  • Composer
  • Database (MySQL)

Installation

Note: Before you start, make sure you have all the prerequisites in place as mentioned in the previous step.

  1. Clone the Project:
git clone https://github.com/MohAlkurdi/Authficate-API.git
  1. Configure Environment Variables:
cp .env.example .env
  1. Install Composer Dependencies:
composer install
  1. Generate Application Key:
php artisan key:generate
  1. Run Database Migrations:
php artisan migrate
  1. Start the Development Server:
php artisan serve

API Reference

Register

POST /api/register
  • Request Body
{
    "name": "Moh",
    "email": "m@m.com",
    "password": "12345678",
    "password_confirmation": "12345678"
}

Login

POST /api/login
  • Request Body
{
    "email": " m@m.com",
    "password": "12345678"
}

Logout

POST /api/logout

Authentication:

Include a Bearer Token in the Authorization header of your HTTP request.

Header Value
Authorization Bearer <your_token_here>

Get a user

GET /api/user
Header Value
Authorization Bearer <your_token_here>

Get user certificates

POST /api/get-certificates
  • Request Body
{
    "email": " m@m.com",
    "password": "12345678"
}
Header Value
Authorization Bearer <your_token_here>

Search for a certificate by id

GET /api/get-certificate/{id}
Parameter Type Description
id string Required. Certificate Id

About

API that interact with different APIs

Resources

Stars

Watchers

Forks