Skip to content

Commit

Permalink
share security context between api and frontend, update somposer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ahilles107 committed Apr 28, 2015
1 parent 06e3828 commit 02e30c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions newscoop/application/configs/symfony/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,11 @@ security:
oauth_authorize:
pattern: ^/oauth/v2/auth
provider: backend_db
context: shared_with_api
form_login:
use_forward: true
login_path: /oauth/v2/auth_login
check_path: /oauth/v2/auth_login_check
remember_me:
key: "changeme"
lifetime: 31536000
path: /
domain: ~

api:
pattern: ^/(api|content\-api)
Expand Down Expand Up @@ -81,6 +77,7 @@ security:
frontend_area:
pattern: ^/
provider: frontend_db
context: shared_with_api
form_login:
login_path: /auth
check_path: /auth/login_check
Expand Down
4 changes: 2 additions & 2 deletions newscoop/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"hybridauth\/hybridauth":"dev-master",
"smarty\/smarty":"3.1.21",
"knplabs\/knp-menu-bundle":"2.0.*@dev",
"knplabs\/knp-menu":"2.0.*@dev",
"knplabs\/knp-menu":"2.0.1",
"friendsofsymfony\/jsrouting-bundle":"~1.1",
"willdurand\/js-translation-bundle":"2.2.0",
"recaptcha\/php5":"v1.0.0",
Expand Down Expand Up @@ -113,4 +113,4 @@
"branch-alias":{
"dev-master":"2.3-dev"
}
}
}
2 changes: 1 addition & 1 deletion newscoop/themes/system_templates/oauth_login.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

<input type="text" class="form-control" placeholder="Login" value="{{ $lastUsername }}" name="_username" required="" autofocus="">
<input type="password" class="form-control" placeholder="Password" name="_password" required="">
<input type="hidden" name="_target_path" value="{{ $targetPath }}" />
<input type="hidden" name="_failure_path" value="{{ $targetPath }}" />
<a class="forgot-password pull-left" href="{{ $view->url(['controller' => 'auth', 'action' => 'password-restore']) }}">Forgot password?</a>
<button class="btn btn-lg btn-primary btn-block" type="submit">
Sign In
Expand Down

0 comments on commit 02e30c8

Please sign in to comment.