Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
php-client
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
Perun
Perun ProxyIdP
php-client
Commits
55517b2b
Unverified
Commit
55517b2b
authored
2 years ago
by
lukasmatusiewicz
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into 28-use-the-image-tag
parents
596004d1
c001e079
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/PIChallenge.php
+3
-0
3 additions, 0 deletions
src/PIChallenge.php
src/PIResponse.php
+5
-0
5 additions, 0 deletions
src/PIResponse.php
test/TriggerChallengeTest.php
+6
-4
6 additions, 4 deletions
test/TriggerChallengeTest.php
with
14 additions
and
4 deletions
src/PIChallenge.php
+
3
−
0
View file @
55517b2b
...
...
@@ -16,6 +16,9 @@ class PIChallenge
/* @var string TransactionId to reference this challenge in later requests. */
public
$transactionID
=
""
;
/* @var string Client mode in which the challenge should be processed. */
public
$clientMode
=
""
;
/* @var string Serial of the token this challenge is for. */
public
$serial
=
""
;
...
...
This diff is collapsed.
Click to expand it.
src/PIResponse.php
+
5
−
0
View file @
55517b2b
...
...
@@ -171,6 +171,11 @@ class PIResponse
{
$tmp
->
attributes
=
$challenge
[
'attributes'
];
}
if
(
isset
(
$challenge
[
'client_mode'
]))
{
$tmp
->
clientMode
=
$challenge
[
'client_mode'
];
}
if
(
$tmp
->
type
===
"webauthn"
)
{
$t
=
$challenge
[
'attributes'
][
'webAuthnSignRequest'
];
...
...
This diff is collapsed.
Click to expand it.
test/TriggerChallengeTest.php
+
6
−
4
View file @
55517b2b
...
...
@@ -47,10 +47,9 @@ class TriggerChallengeTest extends TestCase implements PILog
"
\"
attributes
\"
:null,"
.
"
\"
message
\"
:
\"
BittegebenSieeinenOTP-Wertein:
\"
,"
.
"
\"
messages
\"
:[
\"
BittegebenSieeinenOTP-Wertein:
\"
],"
.
"
\"
multi_challenge
\"
:[{"
.
"
\"
attributes
\"
:null,"
.
"
\"
message
\"
:
\"
BittegebenSieeinenOTP-Wertein:
\"
,"
.
"
\"
serial
\"
:
\"
TOTP00021198
\"
,"
.
"
\"
transaction_id
\"
:
\"
16734787285577957577
\"
,"
.
"
\"
image
\"
:
\"
dataimage
\"
,"
.
"
\"
type
\"
:
\"
totp
\"
}],"
.
"
\"
serial
\"
:
\"
TOTP00021198
\"
,"
.
"
\"
threadid
\"
:140050885818112,"
.
"
\"
transaction_id
\"
:
\"
16734787285577957577
\"
,"
.
"
\"
serial
\"
:
\"
TOTP00021198
\"
,"
.
"
\"
client_mode
\"
:
\"
interactive
\"
,"
.
"
\"
image
\"
:
\"
dataimage
\"
,"
.
"
\"
transaction_id
\"
:
\"
16734787285577957577
\"
,"
.
"
\"
type
\"
:
\"
totp
\"
}],"
.
"
\"
serial
\"
:
\"
TOTP00021198
\"
,"
.
"
\"
threadid
\"
:140050885818112,"
.
"
\"
transaction_id
\"
:
\"
16734787285577957577
\"
,"
.
"
\"
transaction_ids
\"
:[
\"
16734787285577957577
\"
],"
.
"
\"
type
\"
:
\"
totp
\"
},"
.
"
\"
id
\"
:1,"
.
"
\"
jsonrpc
\"
:
\"
2.0
\"
,"
.
"
\"
result
\"
:{"
.
"
\"
status
\"
:true,"
.
"
\"
value
\"
:false},"
.
"
\"
time
\"
:1649666174.5351279,"
.
"
\"
version
\"
:
\"
privacyIDEA3.6.3
\"
,"
.
...
...
@@ -86,6 +85,8 @@ class TriggerChallengeTest extends TestCase implements PILog
$response
=
$this
->
pi
->
triggerchallenge
(
"testUser"
);
$multiChallenge
=
$response
->
multiChallenge
;
$multiChallenge
=
$response
->
multiChallenge
;
$this
->
assertEquals
(
"BittegebenSieeinenOTP-Wertein:"
,
$response
->
message
);
$this
->
assertEquals
(
"BittegebenSieeinenOTP-Wertein:"
,
$response
->
messages
);
$this
->
assertEquals
(
"16734787285577957577"
,
$response
->
transactionID
);
...
...
@@ -99,6 +100,7 @@ class TriggerChallengeTest extends TestCase implements PILog
$this
->
assertEquals
(
""
,
$response
->
u2fMessage
());
$this
->
assertEquals
(
""
,
$response
->
pushMessage
());
$this
->
assertEquals
(
"dataimage"
,
$multiChallenge
[
0
]
->
image
);
$this
->
assertEquals
(
"interactive"
,
$multiChallenge
[
0
]
->
clientMode
);
}
/**
...
...
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