diff --git a/src/Makefile b/src/Makefile index 8de17ad..5227b98 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,8 +3,9 @@ -include .env URL ?= http://localhost:5001/pam-weblogin -TOKEN ?= 1234 +TOKEN ?= Bearer 1234 RETRIES ?= 3 +CACHE_DURATION ?= 60 ATTRIBUTE ?= username prefix ?= /usr/local @@ -70,7 +71,7 @@ pam_weblogin.so: $(OBJS) ../json-parser/libjsonparser.a install: pam_weblogin.so install -d $(prefix)/lib/security/ install pam_weblogin.so $(prefix)/lib/security/ - if [ ! -f /etc/pam-weblogin.conf ]; then echo "url=${URL}\ntoken = Bearer ${TOKEN}\nretries = ${RETRIES}\nattribute=${ATTRIBUTE}\n" | tee "/etc/pam-weblogin.conf"; fi + if [ ! -f /etc/pam-weblogin.conf ]; then echo "url=${URL}\ntoken = Bearer ${TOKEN}\nretries = ${RETRIES}\nattribute=${ATTRIBUTE}\ncache_duration=${CACHE_DURATION}\n" | tee "/etc/pam-weblogin.conf"; fi if [ ! -f /etc/pam.d/weblogin ]; then echo "auth required $(prefix)/lib/security/pam_weblogin.so /etc/pam-weblogin.conf" | tee "/etc/pam.d/weblogin"; fi .PHONY: clean