Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-15592

[fiware-stackoverflow] HWIO OAuth bundle on Symfony 4 only redirect to my url and not to OAuth service

    Details

      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]

      1. https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers

      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

      1. Easy way to control access for large sections of your site
      2. Note: Only the first access control that matches will be used
        access_control:
      • { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
      1. - { 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

        Hide
        backlogmanager Backlog Manager added a comment -

        2019-03-20 18:06|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2019-03-20 18:06|CREATED monitor | # answers= 0, accepted answer= False

          People

          • Assignee:
            aalonsog Alvaro Alonso
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: