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` # 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 # The point is for the user to remove these configuration records
# one by one as the reported problems are removed from the code base. # one by one as the reported problems are removed from the code base.
@ -10,6 +10,7 @@ Documentation/DocumentationAdmonition:
Timezone: UTC Timezone: UTC
Excluded: Excluded:
- src/faaso.cr - src/faaso.cr
- src/daemon.cr
- src/funko.cr - src/funko.cr
- spec/faaso_spec.cr - spec/faaso_spec.cr
Admonitions: Admonitions:

View File

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

View File

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

View File

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