https://github.com/azzarip/api-basic-auth

Basic auth for intraserver communication

https://github.com/azzarip/api-basic-auth

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic auth for intraserver communication

Basic Info
  • Host: GitHub
  • Owner: azzarip
  • License: mit
  • Language: PHP
  • Default Branch: main
  • Size: 31.3 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 1
  • Releases: 3
Created 11 months ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Funding License

README.md

Basic auth system for intraserver api communication

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This package enables secure API communication between two Laravel applications using HTTP Basic Authentication.

Install the package on both applications that need to communicate.

In your .env or config/services.php, define the following:

  • Inbound Password
    Used to authenticate incoming API requests from the other server.

  • Outbound Password
    Used when this application sends outgoing API requests to the other server.

  • Endpoint
    The full URL of the other server (e.g., https://api.example.com).

Installation

You can install the package via composer:

bash composer require azzarip/api-basic-auth

In the config/services.php add the following

php 'username' => [ 'endpoint' => 'http....' //full url for calls 'inbound_password' => env('INBOUND_PASSWORD'), 'outbound_password' => env('OUTBOUND_PASSWORD'), ]

You can define multiple username each of them with endpoint and inbound and outbound password.

Usage

Inbound Requests

For the inbound request use the api.auth middleware, followed by the username as specified in the config file. php Route::get('/api')->middleware('api.auth:username');

This middleware will let all the request with username username and password inbound_password, as specified in the config files.

Testing

bash composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Owner

  • Name: Paride Azzari
  • Login: azzarip
  • Kind: user
  • Location: Zurich
  • Company: ETH Zurich

Theoretical Physicist and Computational Scientist at ETH Zurich

GitHub Events

Total
  • Release event: 1
  • Issue comment event: 1
  • Push event: 9
  • Pull request event: 2
  • Create event: 5
Last Year
  • Release event: 1
  • Issue comment event: 1
  • Push event: 9
  • Pull request event: 2
  • Create event: 5

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 24 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 24 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 3
Top Authors
Issue Authors
Pull Request Authors
  • dependabot[bot] (3)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • packagist 14 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
packagist.org: azzarip/api-basic-auth

Basic auth system for intraserver api communication

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 14 Total
Rankings
Dependent packages count: 16.8%
Dependent repos count: 28.8%
Average: 42.4%
Downloads: 81.5%
Maintainers (1)
Funding
  • url: https://github.com/Azzarip: type: github
Last synced: 10 months ago

Dependencies

composer.json packagist
  • larastan/larastan ^2.9||^3.0 development
  • laravel/pint ^1.14 development
  • nunomaduro/collision ^8.1.1||^7.10.0 development
  • orchestra/testbench ^10.0.0||^9.0.0||^8.22.0 development
  • pestphp/pest ^2.0||^3.0 development
  • pestphp/pest-plugin-arch ^2.5||^3.0 development
  • pestphp/pest-plugin-laravel ^2.0||^3.0 development
  • phpstan/extension-installer ^1.3 development
  • phpstan/phpstan-deprecation-rules ^1.1||^2.0 development
  • phpstan/phpstan-phpunit ^1.3||^2.0 development
  • spatie/laravel-ray ^1.35 development
  • illuminate/contracts ^10.0||^11.0||^12.0
  • php ^8.3
  • spatie/laravel-package-tools ^1.16