Skip to content

Commit

Permalink
part3
Browse files Browse the repository at this point in the history
  • Loading branch information
liuggio committed Dec 3, 2013
1 parent 38363aa commit ede8385
Show file tree
Hide file tree
Showing 14 changed files with 100 additions and 3,029 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/vendor/
/bin/
/composer.phar
/composer.lock
2 changes: 2 additions & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ fos_rest:
access_denied_listener:
json: true
body_listener: true
disable_csrf_role: ROLE_API


nelmio_api_doc:
name: Page API
22 changes: 6 additions & 16 deletions app/config/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ security:
in_memory:
memory:
users:
user: { password: userpass, roles: [ 'ROLE_USER' ] }
admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] }
user: { password: userpass, roles: [ 'ROLE_USER', 'ROLE_API' ] }
admin: { password: adminpass, roles: [ 'ROLE_ADMIN', 'ROLE_API' ] }

firewalls:
dev:
Expand All @@ -23,17 +23,7 @@ security:
security: false

secured_area:
pattern: ^/demo/secured/
form_login:
check_path: _security_check
login_path: _demo_login
logout:
path: _demo_logout
target: _demo
#anonymous: ~
#http_basic:
# realm: "Secured Demo Area"

access_control:
- { path: ^/demo/secured/hello/admin/, roles: ROLE_ADMIN }
#- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
pattern: ^/api
anonymous: ~
http_basic:
realm: "You should have a user name and password"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/rest-bundle": "@dev",
"friendsofsymfony/rest-bundle": "~1.1",
"jms/serializer-bundle": "@dev",
"willdurand/rest-extra-bundle": "@dev",
"nelmio/api-doc-bundle": "@dev"
Expand Down
Loading

0 comments on commit ede8385

Please sign in to comment.