bumped version number (forgot to do that with the last fix)
updated the URL of the script in my GitLAB (moved the repository)
This commit is contained in:
8
privacyidea-checkotp
Normal file → Executable file
8
privacyidea-checkotp
Normal file → Executable file
@@ -3,8 +3,8 @@
|
|||||||
# privacyidea-checkotp - shell implementation of the PrivacyIDEA OTP check for
|
# privacyidea-checkotp - shell implementation of the PrivacyIDEA OTP check for
|
||||||
# integration with FreeRadius on systems without perl
|
# integration with FreeRadius on systems without perl
|
||||||
#
|
#
|
||||||
# Version 1.0, latest version, documentation and bugtracker available at:
|
# Version 1.1, latest version, documentation and bugtracker available at:
|
||||||
# https://gitlab.lindenaar.net/scripts/privacyidea-checkotp
|
# https://gitlab.lindenaar.net/privacyidea/checkotp
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 Frederik Lindenaar
|
# Copyright (c) 2015 Frederik Lindenaar
|
||||||
#
|
#
|
||||||
@@ -51,11 +51,11 @@ otpresult=`/usr/bin/curl -s "$URL" --data-urlencode "user=$LOGIN" --data-urlenco
|
|||||||
# Extract the status of the request from the returned JSON
|
# Extract the status of the request from the returned JSON
|
||||||
otpstatus=`echo $otpresult | sed 's/^{.*"result": *{ *"status": *true, *"value": *\(.*\) *},.*}/\1/'`
|
otpstatus=`echo $otpresult | sed 's/^{.*"result": *{ *"status": *true, *"value": *\(.*\) *},.*}/\1/'`
|
||||||
|
|
||||||
if [ "$otpstatus" = "true" ]; then
|
if [ "$otpstatus" = "true" ]; then
|
||||||
# echo $LOGIN did authenticate $otpresult
|
# echo $LOGIN did authenticate $otpresult
|
||||||
echo Auth-Type=PrivacyIDEA
|
echo Auth-Type=PrivacyIDEA
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$otpstatus" = "false" ]; then
|
elif [ "$otpstatus" = "false" ]; then
|
||||||
# echo $LOGIN did not authenticate $otpresult
|
# echo $LOGIN did not authenticate $otpresult
|
||||||
echo Auth-Type=REJECT
|
echo Auth-Type=REJECT
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user