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

Disallow anonymous API access #552

Closed
wants to merge 8 commits into from
10 changes: 8 additions & 2 deletions app/config/security.yml
Expand Up @@ -16,6 +16,12 @@ security:
pattern: ^/oauth/v2/token
security: false

api:
pattern: ^/.*\.(json|xml)
fos_oauth: true
stateless: true
anonymous: false

public:
pattern: ^/.*
anonymous: true
Expand Down Expand Up @@ -54,7 +60,7 @@ security:
security: false

access_control:
# - { path ^/.*\.(json|xml)$, roles: ROLE_API }
- { path ^/.*\.(json|xml), roles: IS_AUTHENTICATED_FULLY }

encoders:
Acts\CamdramSecurityBundle\Entity\User:
Expand Down Expand Up @@ -91,4 +97,4 @@ hwi_oauth:
csrf: true
include_email: true
raven:
service: Acts\CamdramSecurityBundle\Security\RavenResourceOwner
service: Acts\CamdramSecurityBundle\Security\RavenResourceOwner