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

Move authorize template path move to config file #432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Controller/AuthorizeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function authorizeAction(Request $request)
}

return $this->container->get('templating')->renderResponse(
'FOSOAuthServerBundle:Authorize:authorize.html.'.$this->container->getParameter('fos_oauth_server.template.engine'),
$this->container->getParameter('fos_oauth_server.authorize_template').$this->container->getParameter('fos_oauth_server.template.engine'),
array(
'form' => $form->createView(),
'client' => $this->getClient(),
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ private function addServiceSection(ArrayNodeDefinition $node)
->children()
->scalarNode('storage')->defaultValue('fos_oauth_server.storage.default')->cannotBeEmpty()->end()
->scalarNode('user_provider')->defaultNull()->end()
->scalarNode('authorize_template')->defaultValue('FOSOAuthServerBundle:Authorize:authorize.html.')->end()
->scalarNode('client_manager')->defaultValue('fos_oauth_server.client_manager.default')->end()
->scalarNode('access_token_manager')->defaultValue('fos_oauth_server.access_token_manager.default')->end()
->scalarNode('refresh_token_manager')->defaultValue('fos_oauth_server.refresh_token_manager.default')->end()
Expand Down
1 change: 1 addition & 0 deletions Resources/config/oauth.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<argument type="service" id="fos_oauth_server.refresh_token_manager" />
<argument type="service" id="fos_oauth_server.auth_code_manager" />
<argument type="service" id="fos_oauth_server.user_provider" on-invalid="null" />
<argument type="service" id="fos_oauth_server.authorize_template" />
<argument type="service" id="security.encoder_factory" />
</service>

Expand Down
1 change: 1 addition & 0 deletions Resources/doc/configuration_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fos_oauth_server:
service:
storage: fos_oauth_server.storage.default
user_provider: ~
authorize_template: "FOSOAuthServerBundle:Authorize:authorize.html."
client_manager: fos_oauth_server.client_manager.default
access_token_manager: fos_oauth_server.access_token_manager.default
refresh_token_manager: fos_oauth_server.refresh_token_manager.default
Expand Down