Skip to content

Commit

Permalink
Printing out option info in the config
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Feb 2, 2016
1 parent c8cc109 commit 0baf522
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions DependencyInjection/Providers/GoogleProviderConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ public function buildConfiguration(NodeBuilder $node)
{
// todo - add the comments as help text, and render in README
$node
// Optional value for sending hd parameter. More detail: https://developers.google.com/accounts/docs/OAuth2Login#hd-param
->scalarNode('access_type')->end()
// #Optional value for sending access_type parameter. More detail: https://developers.google.com/identity/protocols/OAuth2WebServer#offline
->scalarNode('hosted_domain')->end()
->scalarNode('access_type')
->info('Optional value for sending hd parameter. More detail: https://developers.google.com/accounts/docs/OAuth2Login#hd-param')
->end()
->scalarNode('hosted_domain')
->info('Optional value for sending access_type parameter. More detail: https://developers.google.com/identity/protocols/OAuth2WebServer#offline')
->end()
;
}

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ knpu_oauth2_client:
# a route name you'll create
redirect_route: connect_google_check
redirect_params: {}
# Optional value for sending hd parameter. More detail: https://developers.google.com/accounts/docs/OAuth2Login#hd-param
# access_type: ''
# Optional value for sending access_type parameter. More detail: https://developers.google.com/identity/protocols/OAuth2WebServer#offline
# hosted_domain: ''
# whether to check OAuth2 "state": defaults to true
# use_state: true
Expand Down
4 changes: 4 additions & 0 deletions bin/update_readme
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ foreach (KnpUOAuth2ClientExtension::getAllSupportedTypes() as $type) {
: "''";
}

if ($child->getInfo()) {
$customKeys[] = '# '.$child->getInfo();
}

// if not required, comment out, it's extra
$keyString = $child->isRequired() ? '' : '# ';
$customKeys[] = $keyString . sprintf(
Expand Down

0 comments on commit 0baf522

Please sign in to comment.