Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
asminog committed May 30, 2019
1 parent 7f74317 commit 1b79aec
Show file tree
Hide file tree
Showing 17 changed files with 460 additions and 236 deletions.
Empty file modified .editorconfig
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
5 changes: 3 additions & 2 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ language: php
php:
- '5.6'
- '7.0'
- hhvm
- '7.1'
- '7.2'

install:
- composer install
- composer update

script: phpunit --verbose --debug --bootstrap tests/bootstrap.php tests
48 changes: 47 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,52 @@ return [
];
```

**NOTE : As of version 1.6.0 you can directly put your configuration into your component. For example:**

```php
<?php

$urlManager = Yii::$app->urlManager;
$spBaseUrl = $urlManager->getHostInfo() . $urlManager->getBaseUrl();

$config = [
// some other configuration here

'components' => [
'saml' => [
'class' => 'asasmoyo\yii2saml\Saml',
'config' => [
'sp' => [
'entityId' => $spBaseUrl.'/saml/metadata',
'assertionConsumerService' => [
'url' => $spBaseUrl.'/saml/acs',
],
'singleLogoutService' => [
'url' => $spBaseUrl.'/saml/sls',
],
'NameIDFormat' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified',
],
'idp' => [
'entityId' => 'identity-provider',
'singleSignOnService' => [
'url' => 'https://idp.com/sso',
],
'singleLogoutService' => [
'url' => 'https://idp.com/sls',
],
'x509cert' => '<x509cert string>',
],
];
]
],

// some other configuration here
];

return $config;

```

Usage
-----

Expand Down Expand Up @@ -207,7 +253,7 @@ Usage
-----

If the SAMLResponse is rejected, add to the SAML settings the parameter
```
```
'debug' => true,
```
and the reason will be prompted.
Expand Down
15 changes: 11 additions & 4 deletions composer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@
{
"name": "Arba Sasmoyo",
"email": "[email protected]"
},
{
"name": "Muhammad Safri Juliardi",
"email": "[email protected]"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"yiisoft/yii2": "*",
"onelogin/php-saml": "~2.13.0"
"yiisoft/yii2": ">=2.0.13",
"onelogin/php-saml": "~3.0.0"
},
"require-dev": {
"phpunit/phpunit": "5.1.*"
"phpunit/phpunit": "5.0.*"
},
"conflict": {
"phpunit/php-timer": ">=2"
},
"autoload": {
"psr-4": {
Expand All @@ -34,4 +41,4 @@
"asminog\\yii2saml\\tests\\": "tests/"
}
}
}
}
Loading

0 comments on commit 1b79aec

Please sign in to comment.