Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-module-privacyidea-pam
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eugene Omelyanovich
python-module-privacyidea-pam
Commits
ff63fdb2
Commit
ff63fdb2
authored
Aug 31, 2016
by
Cornelius Kölbel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add user-agent header PAM
The user-agent header is used by privacyIDEA Client Application Type list. This way privacyIDEA knows, that the request originated from a PAM module. Closes #3
parent
34f00ad1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
privacyidea_pam.py
privacyidea_pam.py
+5
-1
No files found.
privacyidea_pam.py
View file @
ff63fdb2
# -*- coding: utf-8 -*-
#
# 2016-08-31 Cornelius Kölbel <cornelius.koelgel@netknights.it>
# Add header user-agent to request
# 2015-03-04 Cornelius Kölbel <cornelius.koelbel@netknights.it>
# Add normal challenge/response support
# 2016-03-03 Brandon Smith <freedom@reardencode.com>
...
...
@@ -81,8 +83,10 @@ class Authenticator(object):
self
.
sqlfile
=
config
.
get
(
"sqlfile"
,
"/etc/privacyidea/pam.sqlite"
)
def
make_request
(
self
,
data
):
# add a user-agent to be displayed in the Client Application Type
headers
=
{
'user-agent'
:
'PAM/2.15.0'
}
response
=
requests
.
post
(
self
.
URL
+
"/validate/check"
,
data
=
data
,
verify
=
self
.
sslverify
)
headers
=
headers
,
verify
=
self
.
sslverify
)
json_response
=
response
.
json
if
callable
(
json_response
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment