Skip to content

Commit

Permalink
Add cache_duration to example config
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvanes committed Jul 1, 2022
1 parent 812d699 commit 6d1a33b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6d1a33b

Please sign in to comment.