-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring. convert for go module; totp auth
- Loading branch information
1 parent
8ca2faa
commit 9e5553e
Showing
10 changed files
with
532 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env sh | ||
|
||
PATH=$PATH:/usr/local/bin | ||
set -e | ||
|
||
auth_usr=$(head -1 $1) | ||
auth_token=$(tail -1 $1) | ||
|
||
if [ $common_name = ${auth_usr} ]; then | ||
openvpn-user auth --user ${auth_usr} --totp ${auth_token} # --db.path /etc/openvpn/easyrsa/pki/users.db | ||
else | ||
echo "Authorization failed" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
module openvpn-user | ||
module github.com/pashcovich/openvpn-user | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect | ||
github.com/alecthomas/units v0.0.0-20201120081800-1786d5ef83d4 // indirect | ||
github.com/dgryski/dgoogauth v0.0.0-20190221195224-5a805980a5f3 | ||
github.com/mattn/go-sqlite3 v1.14.6 | ||
github.com/stretchr/testify v1.7.0 // indirect | ||
github.com/mattn/go-sqlite3 v1.14.16 | ||
github.com/sirupsen/logrus v1.9.0 | ||
golang.org/x/crypto v0.2.0 | ||
gopkg.in/alecthomas/kingpin.v2 v2.2.6 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.