hwi_oauth:
    # list of names of the firewalls in which this bundle is active, this setting MUST be set
    firewall_names: [main]
    target_path_parameter: _destination
    use_referer: true
    fosub:
        username_iterations: 30
        properties:
            google: gplusUid
            facebook : facebookUid
            communs: communsUid
    resource_owners:
        gplus:
            type:                google
            client_id:           "%oauth_google_id%"
            client_secret:       "%oauth_google_secret%"
            scope:               "email profile"
            options:
                display: popup #dialog is optimized for popup window
                csrf: false
        facebook:
            type:                facebook
            client_id:           "%oauth_facebook_id%"
            client_secret:       "%oauth_facebook_secret%"
            scope:               "public_profile,email"
            options:
                display: popup #dialog is optimized for popup window
                auth_type: rerequest # Re-asking for Declined Permissions

        communs:
            type: oauth2
            paths:
                identifier: sub
                nickname: name
                realname: name
                firstname: given_name
                lastname: family_name
                email: email
            class:          'HWI\Bundle\OAuthBundle\OAuth\ResourceOwner\GenericOAuth2ResourceOwner'
            access_token_url: https://login.lescommuns.org/auth/realms/master/protocol/openid-connect/token
            authorization_url: https://login.lescommuns.org/auth/realms/master/protocol/openid-connect/auth
            infos_url:         https://login.lescommuns.org/auth/realms/master/protocol/openid-connect/userinfo
            client_id:      "%oauth_communs_id%"
            client_secret:  "%oauth_communs_secret%"
            scope:          "email profile openid"

# DEFAULT CONFIG OF THE BUNDLE
# hwi_oauth:
#     # list of names of the firewalls in which this bundle is active, this setting MUST be set
#     firewall_names: [main]

#     # https://github.com/hwi/HWIOAuthBundle/blob/master/Resources/doc/2-configuring_resource_owners.md
#     resource_owners:
#         facebook:
#             type:                facebook
#             client_id:           '%env(FB_ID)%'
#             client_secret:       '%env(FB_SECRET)%'
#             scope:               "email"
#             options:
#                 display: popup
#                 csrf: true