Added basic auth for daemon

This commit is contained in:
Roberto Alsina 2024-06-30 11:55:46 -03:00
parent adb8ce2667
commit 35fa820029
4 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# This configuration file was generated by `ameba --gen-config`
# on 2024-06-30 03:32:11 UTC using Ameba version 1.6.1.
# on 2024-06-30 14:55:35 UTC using Ameba version 1.6.1.
# The point is for the user to remove these configuration records
# one by one as the reported problems are removed from the code base.
@ -10,6 +10,7 @@ Documentation/DocumentationAdmonition:
Timezone: UTC
Excluded:
- src/faaso.cr
- src/daemon.cr
- src/funko.cr
- spec/faaso_spec.cr
Admonitions:

View File

@ -28,6 +28,10 @@ shards:
git: https://github.com/kemalcr/kemal.git
version: 1.5.0
kemal-basic-auth:
git: https://github.com/kemalcr/kemal-basic-auth.git
version: 1.0.0
radix:
git: https://github.com/luislavena/radix.git
version: 0.4.1

View File

@ -10,11 +10,10 @@ targets:
faaso-daemon:
main: src/daemon.cr
crystal: '>= 1.12.2'
crystal: ">= 1.12.2"
license: MIT
dependencies:
docr:
github: ralsina/docr
@ -23,5 +22,7 @@ dependencies:
github: mrrooijen/commander
kemal:
github: kemalcr/kemal
kemal-basic-auth:
github: kemalcr/kemal-basic-auth
crinja:
github: straight-shoota/crinja

View File

@ -1,5 +1,9 @@
require "docr"
require "kemal"
require "kemal-basic-auth"
# FIXME: make configurable
basic_auth "admin", "admin"
current_config = ""