Skip to content

Commit

Permalink
Added support for custom domain (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm authored Jun 28, 2019
1 parent 6043586 commit 6a0c031
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.

## 0.5.2

- Added support for custom SSO domains

## 0.5.1

- Added extra checks so we dont access array keys that do not exist
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function getConfigTreeBuilder()
$root
->children()
->scalarNode('domain')->isRequired()->cannotBeEmpty()->end()
->scalarNode('login_domain')->defaultNull()->info('If you configured SSO with a custom domain.')->end()
->scalarNode('client_id')->isRequired()->cannotBeEmpty()->end()
->scalarNode('client_secret')->isRequired()->cannotBeEmpty()->end()
->scalarNode('cache')->defaultNull()->end()
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/HappyrAuth0Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function load(array $configs, ContainerBuilder $container)

// Add the secret key as parameter
$container->setParameter('auth0.domain', $config['domain']);
$container->setParameter('auth0.login_domain', $config['login_domain'] ?? $config['domain']);
$container->setParameter('auth0.client_id', $config['client_id']);
$container->setParameter('auth0.client_secret', $config['client_secret']);
$container->setParameter('auth0.scope', $config['scope']);
Expand Down
2 changes: 1 addition & 1 deletion Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
- "@security.csrf.token_manager"
- "@security.http_utils"
- "%auth0.client_id%"
- "%auth0.domain%"
- "%auth0.login_domain%"
- "%auth0.scope%"
- # check path
abstract: true

0 comments on commit 6a0c031

Please sign in to comment.