Skip to content

Commit

Permalink
Prepare to clone /demo/* logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Jul 9, 2014
1 parent c672537 commit 4c6ba77
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
35 changes: 35 additions & 0 deletions Tests/TestBundle/Controller/DemoController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,39 @@ public function demoIndexAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}

public function demoResponseTypeCodeAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}

public function demoResponseTypeTokenAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}

public function demoGrantTypeAuthorizationCodeAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}

public function demoGrantTypePasswordAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}

public function demoGrantTypeClientCredentialsAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}

public function demoGrantTypeRefreshTokenAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}

public function demoDebugAction(Request $request)
{
return $this->render('TestBundle:demo:index.html.twig');
}
}
7 changes: 7 additions & 0 deletions Tests/TestBundle/Resources/config/routing_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,28 @@ demo_index:

demo_response_type_code:
pattern: /demo/response_type/code
defaults: { _controller:TestBundle:Demo:demoResponseTypeCode }

demo_response_type_token:
pattern: /demo/response_type/token
defaults: { _controller:TestBundle:Demo:demoResponseTypeToken }

demo_grant_type_authorization_code:
pattern: /demo/grant_type/authorization_code
defaults: { _controller:TestBundle:Demo:demoGrantTypeAuthorizationCode }

demo_grant_type_password:
pattern: /demo/grant_type/password
defaults: { _controller:TestBundle:Demo:demoGrantTypePassword }

demo_grant_type_client_credentials:
pattern: /demo/grant_type/client_credentials
defaults: { _controller:TestBundle:Demo:demoGrantTypeClientCredentials }

demo_grant_type_refresh_token:
pattern: /demo/grant_type/refresh_token
defaults: { _controller:TestBundle:Demo:demoGrantTypeRefreshToken }

demo_debug:
pattern: /demo/debug
defaults: { _controller:TestBundle:Demo:demoDebug }
2 changes: 1 addition & 1 deletion Tests/TestBundle/Resources/views/demo/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="row">
<div class="col-md-12">
<h1 class="page-header">Demo</h1>
<p class="lead">Here we demos some of the basic OAuth2.0 Workflows. Corresponding request and response raw debug message will show in a step-by-step, page-by-page style. Read though <a target="_blank" href="https://github.com/authbucket/oauth2/blob/master/tests/src/AuthBucket/OAuth2/Tests/TestBundle/Resources/config/routing_demo.php">routing_demo.php</a> to see how we implement it.</p>
<p class="lead">Here we demos some of the basic OAuth2.0 Workflows. Corresponding request and response raw debug message will show in a step-by-step, page-by-page style. Read though <a target="_blank" href="https://github.com/authbucket/oauth2-bundle/blob/master/Tests/TestBundle/Resources/config/routing_demo.yml">routing_demo.yml</a> to see how we implement it.</p>
</div>
<div class="col-md-12">
<h2 class="page-header">Authorization Code Grant</h2>
Expand Down

0 comments on commit 4c6ba77

Please sign in to comment.