Skip to content

Instantly share code, notes, and snippets.

@merk
Created September 13, 2012 06:35
Show Gist options
  • Save merk/3712375 to your computer and use it in GitHub Desktop.
Save merk/3712375 to your computer and use it in GitHub Desktop.
hwioauth fosuserbundle
hwi_oauth:
connect: ~
firewall_name: main
fosub:
username_iterations: 30
properties:
github: github
google: google
resource_owners:
google:
type: google
client_id: %google_client_id%
client_secret: %google_client_secret%
github:
type: github
client_id: %github_client_id%
client_secret: %github_client_secret%
jms_security_extra:
secure_all_services: false
expressions: true
security:
acl:
connection: default
providers:
fos_userbundle:
id: fos_user.user_manager
encoders:
FOS\UserBundle\Model\UserInterface: sha512
firewalls:
main:
oauth:
resource_owners:
google: oauth_google
github: oauth_github
login_path: /login
failure_path: /login
oauth_user_provider:
service: hwi_oauth.user.provider.fosub_bridge
pattern: ^/
form_login:
provider: fos_userbundle
csrf_provider: form.csrf_provider
logout: true
anonymous: true
access_control:
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/, role: ROLE_ADMIN }
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: ROLE_ADMIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment