authd/mk/commands.mk

26 lines
751 B
Makefile
Raw Normal View History

2024-11-30 12:02:01 +01:00
# REQUEST EXAMPLES
NAME ?= John
EMAIL ?= john@example.com
# For requests where authentication is required.
LOGIN ?=
ifeq ($(LOGIN),)
LOGIN_OPT =
else
LOGIN_OPT = -l $(LOGIN)
endif
ACTIVATION_KEY ?= put-your-key-here
2024-12-11 11:34:45 +01:00
add-user:; $(Q)$(LOC)authctl user add $(NAME) $(EMAIL) $(LOGIN_OPT)
register:; $(Q)$(LOC)authctl user register $(NAME) $(EMAIL)
validate:; $(Q)$(LOC)authctl user validate $(NAME) $(ACTIVATION_KEY)
get-user:; $(Q)$(LOC)authctl user get $(NAME) $(LOGIN_OPT)
2024-11-30 12:02:01 +01:00
SERVICE ?= 'auth'
RESOURCE ?= '*'
UID ?= 1000
PERMISSION ?= Read
2024-12-11 11:34:45 +01:00
permission-check:; $(LOC)authctl permission check $(UID) $(SERVICE) $(RESOURCE) $(LOGIN_OPT)
permission-set:; $(LOC)authctl permission set $(UID) $(SERVICE) $(RESOURCE) $(PERMISSION) $(LOGIN_OPT)