Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RegApp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janis Streib
RegApp
Commits
8a4f8c55
Commit
8a4f8c55
authored
2 years ago
by
Marcus Meyer
Committed by
Pierre Wolff
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed calls to PrivacyIDEA according to the API Endpoint Documentation
https://privacyidea.readthedocs.io/en/latest/modules/api.html
parent
f74470a2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
regapp-twofa/src/main/java/edu/kit/scc/webreg/service/twofa/pidea/PIConnection.java
+17
-13
17 additions, 13 deletions
.../edu/kit/scc/webreg/service/twofa/pidea/PIConnection.java
with
17 additions
and
13 deletions
regapp-twofa/src/main/java/edu/kit/scc/webreg/service/twofa/pidea/PIConnection.java
+
17
−
13
View file @
8a4f8c55
...
...
@@ -106,7 +106,7 @@ public class PIConnection {
throw
new
TwoFaException
(
"userId missing in config map"
);
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"pass"
,
token
));
...
...
@@ -134,12 +134,12 @@ public class PIConnection {
HttpPost
httpPost
=
new
HttpPost
(
configMap
.
get
(
"url"
)
+
"/validate/check"
);
List
<
NameValuePair
>
nvps
=
new
ArrayList
<
NameValuePair
>();
nvps
.
add
(
new
BasicNameValuePair
(
"serial"
,
serial
));
nvps
.
add
(
new
BasicNameValuePair
(
"pass"
,
token
));
if
(
configMap
.
containsKey
(
"userId"
))
nvps
.
add
(
new
BasicNameValuePair
(
"user"
,
configMap
.
get
(
"userId"
)));
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -180,7 +180,7 @@ public class PIConnection {
throw
new
TwoFaException
(
"userId missing in config map"
);
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -217,7 +217,7 @@ public class PIConnection {
throw
new
TwoFaException
(
"userId missing in config map"
);
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -253,7 +253,7 @@ public class PIConnection {
throw
new
TwoFaException
(
"userId missing in config map"
);
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -284,8 +284,10 @@ public class PIConnection {
httpPost
.
addHeader
(
"PI-Authorization"
,
adminSession
);
List
<
NameValuePair
>
nvps
=
new
ArrayList
<
NameValuePair
>();
if
(
configMap
.
containsKey
(
"userId"
))
nvps
.
add
(
new
BasicNameValuePair
(
"user"
,
configMap
.
get
(
"userId"
)));
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"description"
,
description
));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -312,8 +314,6 @@ public class PIConnection {
httpPost
.
addHeader
(
"PI-Authorization"
,
adminSession
);
List
<
NameValuePair
>
nvps
=
new
ArrayList
<
NameValuePair
>();
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"tokenrealm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"value"
,
value
));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -340,8 +340,10 @@ public class PIConnection {
httpPost
.
addHeader
(
"PI-Authorization"
,
adminSession
);
List
<
NameValuePair
>
nvps
=
new
ArrayList
<
NameValuePair
>();
if
(
configMap
.
containsKey
(
"userId"
))
nvps
.
add
(
new
BasicNameValuePair
(
"user"
,
configMap
.
get
(
"userId"
)));
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"serial"
,
serial
));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -368,8 +370,10 @@ public class PIConnection {
httpPost
.
addHeader
(
"PI-Authorization"
,
adminSession
);
List
<
NameValuePair
>
nvps
=
new
ArrayList
<
NameValuePair
>();
if
(
configMap
.
containsKey
(
"userId"
))
nvps
.
add
(
new
BasicNameValuePair
(
"user"
,
configMap
.
get
(
"userId"
)));
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"serial"
,
serial
));
httpPost
.
setEntity
(
new
UrlEncodedFormEntity
(
nvps
));
...
...
@@ -447,7 +451,7 @@ public class PIConnection {
throw
new
TwoFaException
(
"userId missing in config map"
);
if
(
configMap
.
containsKey
(
"realm"
))
nvps
.
add
(
new
BasicNameValuePair
(
"
token
realm"
,
configMap
.
get
(
"realm"
)));
nvps
.
add
(
new
BasicNameValuePair
(
"realm"
,
configMap
.
get
(
"realm"
)));
URI
uri
=
new
URIBuilder
(
httpGet
.
getURI
())
.
addParameters
(
nvps
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment