26 lines
751 B
Makefile
26 lines
751 B
Makefile
# 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
|
|
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)
|
|
|
|
SERVICE ?= 'auth'
|
|
RESOURCE ?= '*'
|
|
UID ?= 1000
|
|
PERMISSION ?= Read
|
|
permission-check:; $(LOC)authctl permission check $(UID) $(SERVICE) $(RESOURCE) $(LOGIN_OPT)
|
|
permission-set:; $(LOC)authctl permission set $(UID) $(SERVICE) $(RESOURCE) $(PERMISSION) $(LOGIN_OPT)
|