Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:KeyRock
Description
Created question in FIWARE Q/A platform on 20-03-2019 at 16:03
Please, ANSWER this question AT https://stackoverflow.com/questions/55264992/hwio-oauth-bundle-on-symfony-4-only-redirect-to-my-url-and-not-to-oauth-service
Question:
HWIO OAuth bundle on Symfony 4 only redirect to my url and not to OAuth service
Description:
I am using HWIOAuth bundle to authenticate users using Fiware users identity manager, but each time I try to login it just redirect on the same login page instead of redirecting me on OAuth Fiware login page.
This is the config for HWIOAuth:
httplug:
clients:
default:
factory: 'httplug.factory.guzzle6'
config:
timeout: 15
hwi_oauth:
firewall_names: [secured_area]
resource_owners:
fiware:
type: fiware
base_url: https://keyrock.****.org
client_id: 2c87dae1-*******ba35388df068
client_secret: 55b407********7d6d69f4d
and this is my security.yaml:
security:
encoders:
FOS\UserBundle\Model\UserInterface: sha512
role_hierarchy:
ROLE_ADMIN: ROLE_USER
ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
providers:
fos_userbundle:
id: fos_user.user_provider.username
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
secured_area:
anonymous: ~
oauth:
resource_owners:
fiware: "/login/check-fiware"
login_path: /login
use_forward: false
failure_path: /login
oauth_user_provider:
service: my.oauth_aware.user_provider.service
- Easy way to control access for large sections of your site
- Note: Only the first access control that matches will be used
access_control:
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/(fr|en|zh)/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
- { path: ^/admin/, role: ROLE_ADMIN }
- { path: ^/, role: ROLE_USER }
- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
access_denied_url: /login
Activity
- All
- Comments
- History
- Activity
- Transitions