Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

46 upgrade to php 8.0 #50

Merged
merged 23 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/runTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: php-actions/phpunit@master
with:
version: 9.6.7
php_version: 7.3
php_version: 8.0
php_extensions: xdebug
bootstrap: vendor/autoload.php
configuration: test/utils/phpunit.xml
Expand Down
12 changes: 9 additions & 3 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
### v1.0.0 27-01-2023
### v2.0.0
* Added an optional client parameter to forward the client IP with the server requests (#17)
* Code updated to support PHP8 (#46)
* Tests will be temporarily disabled until modernization of http-mock is complete (#46)
* PrivacyIDEA and PIResponse classes made private (#51)

### v1.0.0
* Added a possibility to enroll a new token via challenge (#23)
* Implementation of the preferred client mode (#20)

### v0.9.3 24-01-2022
### v0.9.3

* Supporting following tokens: OTP, Push, WebAuthn, U2F
* Token enrollment in the application
* Multiple WebAuthn

### v0.9.0 16-06-2021
### v0.9.0
* First Version supporting /validate/check and /validate/triggerchallenge endpoints
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This project is intended to ease the use of the privacyIDEA server REST API.
## Requirements

Curl is required for this project to work. If this project is installed using composer, curl is installed automatically.
A PHP Version >=7.3 is preferred.
A PHP Version >=8.0 is preferred.

## Composer

Expand Down
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@
}
],
"require": {
"php": ">=7.3",
"php": ">=8.0",
"curl/curl": "*",
"ext-json": "*",
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "<=9.6.7",
"internations/http-mock": "*"
}
"_comment": "require-dev: phpunit/phpunit: *, internations/http-mock: *"
}
12 changes: 12 additions & 0 deletions src/AuthenticationStatus.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
<?php
/*
* Copyright 2024 NetKnights GmbH - [email protected]
* <p>
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
* you may not use this file except in compliance with the License.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

abstract class AuthenticationStatus
{
Expand Down
22 changes: 0 additions & 22 deletions src/Client-Autoloader.php

This file was deleted.

16 changes: 13 additions & 3 deletions src/PIBadRequestException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
<?php

//namespace PrivacyIdea\PHPClient;
/*
* Copyright 2024 NetKnights GmbH - [email protected]
* <p>
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
* you may not use this file except in compliance with the License.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

class PIBadRequestException extends Exception
{
}
}
44 changes: 27 additions & 17 deletions src/PIChallenge.php
Original file line number Diff line number Diff line change
@@ -1,33 +1,43 @@
<?php

//namespace PrivacyIdea\PHPClient;
/*
* Copyright 2024 NetKnights GmbH - [email protected]
* <p>
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
* you may not use this file except in compliance with the License.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

class PIChallenge
{
/* @var string Type of the token this challenge is for. */
public $type = "";
/* @var string Type of token this challenge is for. */
public string $type = "";

/* @var string Message for this challenge. */
public $message = "";
/* @var string Message extracted from this challenge. */
public string $message = "";

/* @var string Image data for this challenge. */
public $image = "";
/* @var string Image data extracted from this challenge. */
public string $image = "";

/* @var string TransactionId to reference this challenge in later requests. */
public $transactionID = "";
public string $transactionID = "";

/* @var string Client mode in which the challenge should be processed. */
public $clientMode = "";
public string $clientMode = "";

/* @var string Serial of the token this challenge is for. */
public $serial = "";
/* @var string Serial of token this challenge is for. */
public string $serial = "";

/* @var string Arbitrary attributes that can be appended to the challenge by the server. */
public $attributes = "";
public string $attributes = "";

/* @var string JSON format */
public $webAuthnSignRequest = "";
/* @var string WebAuthn sign request in JSON format */
public string $webAuthnSignRequest = "";

/* @var string JSON format */
public $u2fSignRequest = "";
/* @var string U2F sign request in JSON format */
public string $u2fSignRequest = "";
}
18 changes: 15 additions & 3 deletions src/PILog.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
<?php

//namespace PrivacyIdea\PHPClient;
/*
* Copyright 2024 NetKnights GmbH - [email protected]
* <p>
* Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3;
* you may not use this file except in compliance with the License.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Logging interface. This is used to relay the log messages of the PHP-Client to the logger implementation of the project that uses the client.
* Logging interface. This is used to relay the log
* messages of the PHP-Client to the logger
* implementation of the project that uses the client.
*/
interface PILog
{
Expand Down
Loading
Loading