Skip to content

Commit

Permalink
Merge pull request #370 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 6.8.2 -- added User-Agent header to MFA API client
  • Loading branch information
briskt authored Sep 18, 2024
2 parents dc6fb25 + dee4e74 commit fbe83f4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
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

0 comments on commit fbe83f4

Please sign in to comment.