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

Fixes #13

Merged
merged 5 commits into from Nov 24, 2017
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 13 additions & 4 deletions CHANGELOG.md
@@ -1,12 +1,21 @@
# CHANGELOG

## v0.7.2
## [unreleased]

### Add
- Add an ability to receive GET and POST requests
- \AdactiveSas\Saml2BridgeBundle\Entity\IdentityProvider::getSsoBinding was removed
- \AdactiveSas\Saml2BridgeBundle\Entity\IdentityProvider::getSlsBinding was removed
- receiving POST binding request
- NewRelic example
- Single sign-on using `HostedIdentityProviderProcessor::processSingleSignOn` now supports GET and POST requests.
- Single logout using `HostedIdentityProviderProcessor::processSingleLogoutService` now supports GET and POST messages.

## Fix
- remove dependency of "roave/security-advisories" to allow require without putting minimum stability dev (#10)[https://github.com/AdactiveSAS/saml2-bridge-bundle/issues/10]

## Deprecated
- `\AdactiveSas\Saml2BridgeBundle\Entity\IdentityProvider::getSsoBinding` was removed, overwriting this method have no
more effects.
- `\AdactiveSas\Saml2BridgeBundle\Entity\IdentityProvider::getSlsBinding` was removed, overwriting this method have no
more effects.

## v0.7.1

Expand Down
16 changes: 13 additions & 3 deletions composer.json
@@ -1,7 +1,18 @@
{
"name": "adactive-sas/saml2-bridge-bundle",
"description": "This bundle aim to integrate simplesamlphp/saml2 library",
"keywords": ["adactiveSas", "simplesamlphp", "SAML", "SAML2", "Symfony", "Bundle"],
"keywords": [
"adactiveSas",
"SAML",
"SAML2",
"idp",
"identity-provider",
"saml-idp",
"Symfony",
"Bundle",
"symfony-bundle",
"bridge"
],
"type": "symfony-bundle",
"license": "GPL-3.0",
"minimum-stability": "stable",
Expand All @@ -16,8 +27,7 @@
"ext-openssl": "*",
"simplesamlphp/saml2": "^1.10.3",
"symfony/symfony": "^2.7.0|^3.0.0",
"symfony/workflow": "^3.0.0",
"roave/security-advisories": "dev-master"
"symfony/workflow": "^3.0.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7.17",
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Expand Up @@ -21,7 +21,7 @@

<testsuites>
<testsuite name="SAML Bridge Bundle Test Suite">
<directory>src/Tests</directory>
<directory suffix="Test.php" >src/Tests</directory>
</testsuite>
</testsuites>

Expand Down
4 changes: 2 additions & 2 deletions src/Resources/views/Metadata/metadata.xml.twig
Expand Up @@ -2,10 +2,10 @@
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="{{ metadata.entityId }}">
{% if metadata.hasIdp %}
<md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:SingleSignOnService Binding="{{ constant('\SAML2_Const::BINDING_HTTP_REDIRECT') }}" Location="{{ metadata.idp.ssoUrl }}"/>
<md:SingleSignOnService Binding="{{ constant('\SAML2_Const::BINDING_HTTP_POST') }}" Location="{{ metadata.idp.ssoUrl }}"/>
<md:SingleLogoutService Binding="{{ constant('\SAML2_Const::BINDING_HTTP_REDIRECT') }}" Location="{{ metadata.idp.slsUrl }}"/>
<md:SingleLogoutService Binding="{{ constant('\SAML2_Const::BINDING_HTTP_POST') }}" Location="{{ metadata.idp.slsUrl }}"/>
<md:SingleSignOnService Binding="{{ constant('\SAML2_Const::BINDING_HTTP_REDIRECT') }}" Location="{{ metadata.idp.ssoUrl }}"/>
<md:SingleSignOnService Binding="{{ constant('\SAML2_Const::BINDING_HTTP_POST') }}" Location="{{ metadata.idp.ssoUrl }}"/>
</md:IDPSSODescriptor>
{% endif %}
</md:EntityDescriptor>
2 changes: 1 addition & 1 deletion src/SAML2/Provider/HostedIdentityProviderProcessor.php
Expand Up @@ -401,7 +401,7 @@ public function continueSingleSignOn()
*/
public function processSingleLogoutService(Request $httpRequest)
{
$inputBinding = $this->bindingContainer->get($this->identityProvider->getSlsBinding());
$inputBinding = $this->bindingContainer->getByRequestMethod($httpRequest->getMethod());

try {
$logoutMessage = $inputBinding->receiveUnsignedMessage($httpRequest);
Expand Down
6 changes: 3 additions & 3 deletions src/Tests/Functional/MetadataTest.php
Expand Up @@ -18,17 +18,17 @@

namespace AdactiveSas\Saml2BridgeBundle\Tests\Functional;

class MetadataTestTest extends WebTestCase
class MetadataTest extends WebTestCase
{
protected $metadataExpected =
<<<META
<?xml version="1.0" encoding="UTF-8"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" entityID="http://localhost/saml/metadata/">
<md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://localhost/saml/sso/"/>
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost/saml/sso/"/>
<md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://localhost/saml/sls/"/>
<md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost/saml/sls/"/>
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="http://localhost/saml/sso/"/>
<md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="http://localhost/saml/sso/"/>
</md:IDPSSODescriptor>
</md:EntityDescriptor>
META;
Expand Down