Skip to content

Commit 1584a2e

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent 22d42c3 commit 1584a2e

13 files changed

+561
-5
lines changed

gen-src/ChromeDevtoolsProtocol/Domain/WebAuthnDomain.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44

55
use ChromeDevtoolsProtocol\ContextInterface;
66
use ChromeDevtoolsProtocol\InternalClientInterface;
7+
use ChromeDevtoolsProtocol\Model\WebAuthn\AddCredentialRequest;
78
use ChromeDevtoolsProtocol\Model\WebAuthn\AddVirtualAuthenticatorRequest;
89
use ChromeDevtoolsProtocol\Model\WebAuthn\AddVirtualAuthenticatorResponse;
10+
use ChromeDevtoolsProtocol\Model\WebAuthn\ClearCredentialsRequest;
11+
use ChromeDevtoolsProtocol\Model\WebAuthn\GetCredentialsRequest;
12+
use ChromeDevtoolsProtocol\Model\WebAuthn\GetCredentialsResponse;
913
use ChromeDevtoolsProtocol\Model\WebAuthn\RemoveVirtualAuthenticatorRequest;
1014

1115
class WebAuthnDomain implements WebAuthnDomainInterface
@@ -20,13 +24,25 @@ public function __construct(InternalClientInterface $internalClient)
2024
}
2125

2226

27+
public function addCredential(ContextInterface $ctx, AddCredentialRequest $request): void
28+
{
29+
$this->internalClient->executeCommand($ctx, 'WebAuthn.addCredential', $request);
30+
}
31+
32+
2333
public function addVirtualAuthenticator(ContextInterface $ctx, AddVirtualAuthenticatorRequest $request): AddVirtualAuthenticatorResponse
2434
{
2535
$response = $this->internalClient->executeCommand($ctx, 'WebAuthn.addVirtualAuthenticator', $request);
2636
return AddVirtualAuthenticatorResponse::fromJson($response);
2737
}
2838

2939

40+
public function clearCredentials(ContextInterface $ctx, ClearCredentialsRequest $request): void
41+
{
42+
$this->internalClient->executeCommand($ctx, 'WebAuthn.clearCredentials', $request);
43+
}
44+
45+
3046
public function disable(ContextInterface $ctx): void
3147
{
3248
$request = new \stdClass();
@@ -41,6 +57,13 @@ public function enable(ContextInterface $ctx): void
4157
}
4258

4359

60+
public function getCredentials(ContextInterface $ctx, GetCredentialsRequest $request): GetCredentialsResponse
61+
{
62+
$response = $this->internalClient->executeCommand($ctx, 'WebAuthn.getCredentials', $request);
63+
return GetCredentialsResponse::fromJson($response);
64+
}
65+
66+
4467
public function removeVirtualAuthenticator(ContextInterface $ctx, RemoveVirtualAuthenticatorRequest $request): void
4568
{
4669
$this->internalClient->executeCommand($ctx, 'WebAuthn.removeVirtualAuthenticator', $request);

gen-src/ChromeDevtoolsProtocol/Domain/WebAuthnDomainInterface.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
namespace ChromeDevtoolsProtocol\Domain;
44

55
use ChromeDevtoolsProtocol\ContextInterface;
6+
use ChromeDevtoolsProtocol\Model\WebAuthn\AddCredentialRequest;
67
use ChromeDevtoolsProtocol\Model\WebAuthn\AddVirtualAuthenticatorRequest;
78
use ChromeDevtoolsProtocol\Model\WebAuthn\AddVirtualAuthenticatorResponse;
9+
use ChromeDevtoolsProtocol\Model\WebAuthn\ClearCredentialsRequest;
10+
use ChromeDevtoolsProtocol\Model\WebAuthn\GetCredentialsRequest;
11+
use ChromeDevtoolsProtocol\Model\WebAuthn\GetCredentialsResponse;
812
use ChromeDevtoolsProtocol\Model\WebAuthn\RemoveVirtualAuthenticatorRequest;
913

1014
/**
@@ -18,6 +22,17 @@
1822
*/
1923
interface WebAuthnDomainInterface
2024
{
25+
/**
26+
* Adds the credential to the specified authenticator.
27+
*
28+
* @param ContextInterface $ctx
29+
* @param AddCredentialRequest $request
30+
*
31+
* @return void
32+
*/
33+
public function addCredential(ContextInterface $ctx, AddCredentialRequest $request): void;
34+
35+
2136
/**
2237
* Creates and adds a virtual authenticator.
2338
*
@@ -29,6 +44,17 @@ interface WebAuthnDomainInterface
2944
public function addVirtualAuthenticator(ContextInterface $ctx, AddVirtualAuthenticatorRequest $request): AddVirtualAuthenticatorResponse;
3045

3146

47+
/**
48+
* Clears all the credentials from the specified device.
49+
*
50+
* @param ContextInterface $ctx
51+
* @param ClearCredentialsRequest $request
52+
*
53+
* @return void
54+
*/
55+
public function clearCredentials(ContextInterface $ctx, ClearCredentialsRequest $request): void;
56+
57+
3258
/**
3359
* Disable the WebAuthn domain.
3460
*
@@ -49,6 +75,17 @@ public function disable(ContextInterface $ctx): void;
4975
public function enable(ContextInterface $ctx): void;
5076

5177

78+
/**
79+
* Returns all the credentials stored in the given virtual authenticator.
80+
*
81+
* @param ContextInterface $ctx
82+
* @param GetCredentialsRequest $request
83+
*
84+
* @return GetCredentialsResponse
85+
*/
86+
public function getCredentials(ContextInterface $ctx, GetCredentialsRequest $request): GetCredentialsResponse;
87+
88+
5289
/**
5390
* Removes the given authenticator.
5491
*

gen-src/ChromeDevtoolsProtocol/Model/Page/Frame.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,19 @@ final class Frame implements \JsonSerializable
4040
public $name;
4141

4242
/**
43-
* Frame document's URL.
43+
* Frame document's URL without fragment.
4444
*
4545
* @var string
4646
*/
4747
public $url;
4848

49+
/**
50+
* Frame document's URL fragment including the '#'.
51+
*
52+
* @var string|null
53+
*/
54+
public $urlFragment;
55+
4956
/**
5057
* Frame document's security origin.
5158
*
@@ -61,7 +68,7 @@ final class Frame implements \JsonSerializable
6168
public $mimeType;
6269

6370
/**
64-
* If the frame failed to load, this contains the URL that could not be loaded.
71+
* If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
6572
*
6673
* @var string|null
6774
*/
@@ -86,6 +93,9 @@ public static function fromJson($data)
8693
if (isset($data->url)) {
8794
$instance->url = (string)$data->url;
8895
}
96+
if (isset($data->urlFragment)) {
97+
$instance->urlFragment = (string)$data->urlFragment;
98+
}
8999
if (isset($data->securityOrigin)) {
90100
$instance->securityOrigin = (string)$data->securityOrigin;
91101
}
@@ -117,6 +127,9 @@ public function jsonSerialize()
117127
if ($this->url !== null) {
118128
$data->url = $this->url;
119129
}
130+
if ($this->urlFragment !== null) {
131+
$data->urlFragment = $this->urlFragment;
132+
}
120133
if ($this->securityOrigin !== null) {
121134
$data->securityOrigin = $this->securityOrigin;
122135
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\WebAuthn;
4+
5+
/**
6+
* Request for WebAuthn.addCredential command.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class AddCredentialRequest implements \JsonSerializable
13+
{
14+
/** @var string */
15+
public $authenticatorId;
16+
17+
/** @var Credential */
18+
public $credential;
19+
20+
21+
public static function fromJson($data)
22+
{
23+
$instance = new static();
24+
if (isset($data->authenticatorId)) {
25+
$instance->authenticatorId = (string)$data->authenticatorId;
26+
}
27+
if (isset($data->credential)) {
28+
$instance->credential = Credential::fromJson($data->credential);
29+
}
30+
return $instance;
31+
}
32+
33+
34+
public function jsonSerialize()
35+
{
36+
$data = new \stdClass();
37+
if ($this->authenticatorId !== null) {
38+
$data->authenticatorId = $this->authenticatorId;
39+
}
40+
if ($this->credential !== null) {
41+
$data->credential = $this->credential->jsonSerialize();
42+
}
43+
return $data;
44+
}
45+
46+
47+
/**
48+
* Create new instance using builder.
49+
*
50+
* @return AddCredentialRequestBuilder
51+
*/
52+
public static function builder(): AddCredentialRequestBuilder
53+
{
54+
return new AddCredentialRequestBuilder();
55+
}
56+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\WebAuthn;
4+
5+
use ChromeDevtoolsProtocol\Exception\BuilderException;
6+
7+
/**
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class AddCredentialRequestBuilder
13+
{
14+
private $authenticatorId;
15+
16+
private $credential;
17+
18+
19+
/**
20+
* Validate non-optional parameters and return new instance.
21+
*/
22+
public function build(): AddCredentialRequest
23+
{
24+
$instance = new AddCredentialRequest();
25+
if ($this->authenticatorId === null) {
26+
throw new BuilderException('Property [authenticatorId] is required.');
27+
}
28+
$instance->authenticatorId = $this->authenticatorId;
29+
if ($this->credential === null) {
30+
throw new BuilderException('Property [credential] is required.');
31+
}
32+
$instance->credential = $this->credential;
33+
return $instance;
34+
}
35+
36+
37+
/**
38+
* @param string $authenticatorId
39+
*
40+
* @return self
41+
*/
42+
public function setAuthenticatorId($authenticatorId): self
43+
{
44+
$this->authenticatorId = $authenticatorId;
45+
return $this;
46+
}
47+
48+
49+
/**
50+
* @param Credential $credential
51+
*
52+
* @return self
53+
*/
54+
public function setCredential($credential): self
55+
{
56+
$this->credential = $credential;
57+
return $this;
58+
}
59+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\WebAuthn;
4+
5+
/**
6+
* Request for WebAuthn.clearCredentials command.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ClearCredentialsRequest implements \JsonSerializable
13+
{
14+
/** @var string */
15+
public $authenticatorId;
16+
17+
18+
public static function fromJson($data)
19+
{
20+
$instance = new static();
21+
if (isset($data->authenticatorId)) {
22+
$instance->authenticatorId = (string)$data->authenticatorId;
23+
}
24+
return $instance;
25+
}
26+
27+
28+
public function jsonSerialize()
29+
{
30+
$data = new \stdClass();
31+
if ($this->authenticatorId !== null) {
32+
$data->authenticatorId = $this->authenticatorId;
33+
}
34+
return $data;
35+
}
36+
37+
38+
/**
39+
* Create new instance using builder.
40+
*
41+
* @return ClearCredentialsRequestBuilder
42+
*/
43+
public static function builder(): ClearCredentialsRequestBuilder
44+
{
45+
return new ClearCredentialsRequestBuilder();
46+
}
47+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\WebAuthn;
4+
5+
use ChromeDevtoolsProtocol\Exception\BuilderException;
6+
7+
/**
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ClearCredentialsRequestBuilder
13+
{
14+
private $authenticatorId;
15+
16+
17+
/**
18+
* Validate non-optional parameters and return new instance.
19+
*/
20+
public function build(): ClearCredentialsRequest
21+
{
22+
$instance = new ClearCredentialsRequest();
23+
if ($this->authenticatorId === null) {
24+
throw new BuilderException('Property [authenticatorId] is required.');
25+
}
26+
$instance->authenticatorId = $this->authenticatorId;
27+
return $instance;
28+
}
29+
30+
31+
/**
32+
* @param string $authenticatorId
33+
*
34+
* @return self
35+
*/
36+
public function setAuthenticatorId($authenticatorId): self
37+
{
38+
$this->authenticatorId = $authenticatorId;
39+
return $this;
40+
}
41+
}

0 commit comments

Comments
 (0)