https://github.com/prosapient/dev_space_auth
https://github.com/prosapient/dev_space_auth
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/prosapient/dev_space_auth
- Owner: prosapient
- License: apache-2.0
- Created: 2021-07-15T09:06:13.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-07-06T11:37:45.000Z (over 2 years ago)
- Last Synced: 2025-01-07T18:26:05.294Z (10 months ago)
- Language: Elixir
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# DevSpaceAuth
`DevSpaceAuth` is a wrapper around `Plug.BasicAuth` with rate limiting and global configuration.
It is designed to protect endpoints that are used only by developers.
## Installation
The package can be installed by adding `dev_space_auth` and `hammer` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:dev_space_auth, github: "prosapient/dev_space_auth"},
{:hammer, "~> 6.0"}
]
end
```
Configure Hammer:
```elixir
config :hammer,
backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4,
cleanup_interval_ms: 60_000 * 10]}
```
Configure DevSpaceAuth:
```elixir
config :dev_space_auth,
username: "username",
password: "password"
```