Skip to content

Repository files navigation

DevSpaceAuth

DevSpaceAuth is a wrapper around Plug.BasicAuth with rate limiting. It is designed to protect endpoints that are used only by developers.

Installation

Add dev_space_auth to your list of dependencies in mix.exs:

defdepsdo[{:dev_space_auth,github: "prosapient/dev_space_auth"}]end

Setup

  1. Define a rate limiter module in your app:
defmoduleMyApp.RateLimitdouseHammer,backend: :etsend
  1. Add it to your supervision tree (before the endpoint):
children=[MyApp.RateLimit,MyAppWeb.Endpoint]
  1. Use the plug with the rate_limiter option:
pipeline:dev_space_authdoplugDevSpaceAuth,rate_limiter: MyApp.RateLimitend
  1. Configure credentials:
config:dev_space_auth,username: "username",password: "password"

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages