8000 GitHub - oralunal/scribe-auth: A Laravel middleware package that adds authentication protection to your Scribe API documentation.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A Laravel middleware package that adds authentication protection to your Scribe API documentation.

License

Notifications You must be signed in to change notification settings

oralunal/scribe-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scribe Auth Middleware

A Laravel middleware package that adds authentication protection to your Scribe API documentation. This package provides a simple way to secure your API documentation with basic authentication, ensuring that only authorized users can access your API documentation pages.

Requirements

  1. Scribe's type config should be set to laravel in your config/scribe.php file.
  2. Scribe's laravel->add_routes config should be set to true in your config/scribe.php file.

Installation

  1. Install the package via Composer:
composer require oralunal/scribe-auth
  1. Add the web and scribe.auth middleware to your config/scribe.php file:
'middleware' => [
    // ...
    'web',
    'scribe.auth',
],
  1. Publish the configuration file:
php artisan vendor:publish --tag=scribe-auth-config

Configuration

The package comes with a config file (config/scribe-auth.php) where you can customize the following settings:

  • SCRIBE_AUTH_ENABLED: Enable/disable the middleware (Default: false)
  • SCRIBE_AUTH_PASSWORD: Authentication password (Default: 1234567890)

Add the following environment variable to your .env file:

SCRIBE_AUTH_ENABLED=true
SCRIBE_AUTH_PASSWORD=your_fantastic_password

Security

  • Use different credentials in production
  • Choose a strong password
  • Keep your credentials secure

License

This package is open-sourced software licensed under the MIT license.

About

A Laravel middleware package that adds authentication protection to your Scribe API documentation.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0