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

Added Schultz Fasit handler #135

Merged
merged 7 commits into from
Dec 5, 2024

Conversation

jekuaitk
Copy link
Contributor

@jekuaitk jekuaitk commented Oct 6, 2024

Adds Schultz Fasit handler

'#description' => $this->t('Specifies which api version to use. Should probably be v2'),
];

$certificate = $this->settings->getCertificate();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should real use the key module for this type of data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which have support for different vault backends.

Copy link
Contributor Author

@jekuaitk jekuaitk Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support for keys will be added when it has been finished!

Currently, it is till work in progress.


if (self::LOCATOR_TYPE_AZURE_KEY_VAULT === $locatorType) {
$httpClient = new GuzzleAdapter(new Client());
$requestFactory = new RequestFactory();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would one not inject a Drupal::httpClient using PSR18/17 interfaces and not be locked into guzzle?

Copy link
Contributor Author

@jekuaitk jekuaitk Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PSR18/17 does not have built-in mechanisms for working with certificates. This means, we would end up needing a hard requirement on some sort of adapter (e.g. Guzzle) in order to end up with a PSR18 compliant client, anyways.

@jekuaitk jekuaitk requested a review from cableman November 19, 2024 11:33
'headers' => [
'Content-Type' => 'application/xml',
],
'body' => $doc->saveXML(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IfXML failing fails, body would be FALSE
What happens after this, is that behaviour handled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added extra check to handle body being FALSE.

@stankut
Copy link
Collaborator

stankut commented Nov 29, 2024

i was asked to review the code.
good job, well written, i was only able to one potential edge case. If that is though thought, i have no further questions.

@jekuaitk jekuaitk merged commit 4b13e9c into OS2Forms:develop Dec 5, 2024
7 checks passed
@jekuaitk jekuaitk deleted the feature/schultz-fasit-handler branch December 5, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants