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

Release 6.8.2 -- added User-Agent header to MFA API client #370

Merged
merged 5 commits into from
Sep 18, 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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @silinternational/php-devs
9 changes: 5 additions & 4 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: Test and Publish
on:
push:

env:
IMAGE_NAME: ${{ vars.DOCKER_ORG }}/idp-id-broker

jobs:
tests:
name: Tests
Expand Down Expand Up @@ -36,7 +33,11 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand Down
9 changes: 9 additions & 0 deletions api.raml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ types:
}
/authentication:
post:
queryParameters:
rpOrigin:
description: relying party origin
type: string
example: "https://sub.domain.com"
body:
type: Authentication
responses:
Expand All @@ -359,6 +364,10 @@ types:
authentication failed).
body:
type: Error
403:
description: The rpOrigin does not match any of the configured values.
body:
type: Error
410:
description: >
The invite has expired. A new code has been generated and emailed
Expand Down
4 changes: 2 additions & 2 deletions application/common/components/MfaApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace common\components;

use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Exception\ServerException;
use Psr\Http\Message\ResponseInterface;
Expand Down Expand Up @@ -55,6 +55,7 @@ public function __construct(string $apiBaseUrl, $apiKey, $apiSecret)
'X-MFA-APIKey' => $apiKey,
'X-MFA-APISecret' => $apiSecret,
'Content-type' => 'application/json',
'User-Agent' => 'idp-id-broker',
];

$this->client = new GuzzleClient([
Expand Down Expand Up @@ -118,7 +119,6 @@ public function validateTotp(string $uuid, string $code): bool
}



/**
* @param array $additionalHeaders
* @return array
Expand Down