HWIOAuthBundle | OAuth client integration for Symfony Supports both OAuth10a and OAuth2 | OAuth library

 by   hwi PHP Version: 2.0.0-BETA2 License: MIT

kandi X-RAY | HWIOAuthBundle Summary

kandi X-RAY | HWIOAuthBundle Summary

HWIOAuthBundle is a PHP library typically used in Security, OAuth, Symfony applications. HWIOAuthBundle has no vulnerabilities, it has a Permissive License and it has medium support. However HWIOAuthBundle has 3 bugs. You can download it from GitHub.

[License] The HWIOAuthBundle adds support for authenticating users via OAuth1.0a or OAuth2 in Symfony.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              HWIOAuthBundle has a medium active ecosystem.
              It has 2203 star(s) with 792 fork(s). There are 86 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 38 open issues and 876 have been closed. On average issues are closed in 151 days. There are 8 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of HWIOAuthBundle is 2.0.0-BETA2

            kandi-Quality Quality

              HWIOAuthBundle has 3 bugs (0 blocker, 0 critical, 2 major, 1 minor) and 84 code smells.

            kandi-Security Security

              HWIOAuthBundle has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              HWIOAuthBundle code analysis shows 0 unresolved vulnerabilities.
              There are 39 security hotspots that need review.

            kandi-License License

              HWIOAuthBundle is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              HWIOAuthBundle releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.
              HWIOAuthBundle saves you 5848 person hours of effort in developing the same functionality from scratch.
              It has 7571 lines of code, 606 functions and 148 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed HWIOAuthBundle and discovered the below as its top functions. This is intended to give you an instant insight into HWIOAuthBundle implemented functionality, and help decide if they suit your requirements.
            • Loads the configuration .
            • Get request token .
            • Handle OAuth errors
            • Add OAuth provider configuration .
            • Get user information .
            • Get the value for a path .
            • Sets the user data .
            • Create OAuth provider .
            • Returns the preferred locale value .
            • Configure the security provider .
            Get all kandi verified functions for this library.

            HWIOAuthBundle Key Features

            No Key Features are available at this moment for HWIOAuthBundle.

            HWIOAuthBundle Examples and Code Snippets

            No Code Snippets are available at this moment for HWIOAuthBundle.

            Community Discussions

            QUESTION

            Symfony 4.4 Auth0 how to completely logout user from the application
            Asked 2021-Aug-26 at 06:58
            Basic info:

            I created a test application to test if SSO (Single sign on) works. I use Auth0 as a SSO provider. Symfony 4.4 as application framework. I used this article from Auth0 to create the basics. So far I can login/logout.

            Problem:

            When I login once (with credentials), logout after and then login again I am instandly logged in with the same account I used before. Without needing to fill in credentials again. It seems to remember the session or somehow does not completely logout a user. I want the user to have to login again with credentials after it logged out. Since some of my users will use one computer for the applications (so switching user is needed).

            Possible fix/Extra info:

            According to there docs/community I should look at this. But this seems to mean that I need API calls to add the ?federated. Which the setup example does not use (probably the library does it for me). Also my logout function in the SecurityController that is generated by the make:auth (or make:user) doesn't execute the code anymore. Even if I change the function name it still logged me out. Only untill I remove/change the route name it stops. It's probably very bad but maybe if I had the chance to execute a API call when I logout I could do this API call.

            The best thing I could imagine to do is change some settings in symfony or add some small piece of code to make it logout correclty. But I dont know how.

            My code:

            SecurityController.php

            ...

            ANSWER

            Answered 2021-Aug-26 at 06:58

            It looks like that you have to logout from the oauth service you are using, here is a similar issue.

            Worked out in code:

            src/Security/CustomLogoutSuccessHandler.php

            Source https://stackoverflow.com/questions/68859855

            QUESTION

            How do I have HWI OAuth Bundle behave well in a containerized application behind a reverse proxy?
            Asked 2020-Jun-25 at 12:37
            Context

            I've been running an intranet admin panel in Symfony 3.x for several years. The users login with google oauth and the system checks if the email matches a validated one in a lookup-list. The oauth client handling is done with the "HWI OAuth Bundle".

            In order to start a clean way to migrate this admin panel into SF4 and later to SF5 we've started breaking our monolyth into microservices running in docker.

            Moving to docker behind a reverse proxy

            Today we were moving this admin panel into a docker. Then we are having the public apache2 doing a ProxyPass towards the docker running the admin panel. Let's imagine the docker runs in http://1.2.3.4:7540 Let's assume the public address is https://admin-europe.example.com

            What happens is that the symfony application has a relative URL, as the route google_login configured in the routing.yml and in the service configuration defined in the security.yml:

            routing:

            ...

            ANSWER

            Answered 2020-Jun-25 at 12:37

            The underlying reason is the way Symfony generated the full-addresses from a relative path or route name.

            Here's the investigation:

            • The method HWI/OAuthUtils::getAuthorizationUrl() is the one that generates the OAUth auth URI and consumes the method Symfony/HttpUtils::generateUri() to get the absolute URI of the redirect_to callback that will be encoded inside the Auth URI.

            • The method Symfony/HttpUtils::generateUri() generates an absolute URI (that in our case will be the callback) and to do so, the method handles 3 general cases:

              • The parameter is already an absolute URI (the return is the parameter without further processing)
              • The parameter is a relative URL (the function calls the Request class to build the proto + host + port + project-path prefix to prepend to the relative URI)
              • The parameter is a route name (the funcion calls the Router class to build the absolute URI)

            In my example I was configuring a relative URL (google: "/login/check-google") in the security.yml so HttpUtils was delegating into the Request class.

            Looking at the source of the Request class we observe:

            • The Request class is able to use proxy headers to build the absolute class.
            • But for security, by default symfony does not trust that a proxy exists merely because there are X-FORWARDED-* headers in it.
            • Indeed it's more secure plus more flexible.
            • There are 2 levels of security:
              • Somewhere we need to tell the Request class what is the list of trusted IPs that are proxies accessing the application.
              • Somewhere else we need to tell the Request class what specific proxy headers are trusted and what headers are not, even it supports different standards headers (RFC headers, non-RFC apache headers, etc)

            Stated here https://symfony.com/blog/fixing-the-trusted-proxies-configuration-for-symfony-3-3 is that you need to configure the trusted proxies in the front-controller by calling the static method Request::setTrustedProxies();

            So adding those couple of lines in the front-controller one killing non-nee4ded headers and the other with the IP ranges of the proxies, solved the problem:

            Source https://stackoverflow.com/questions/62504934

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install HWIOAuthBundle

            All the installation instructions are located in the documentation, check it for a specific version:.
            [2.0](https://github.com/hwi/HWIOAuthBundle/blob/master/docs/1-setting_up_the_bundle.md) (upcoming) - with support for Symfony: ^4.4, ^5.4 & ^6.0 (PHP: ^7.4, ^8.0),
            [1.4](https://github.com/hwi/HWIOAuthBundle/blob/1.4/docs/1-setting_up_the_bundle.md) (current) - with support for Symfony: ^4.4 & ^5.1 (PHP: ^7.3 & ^8.0),
            1.3 (outdated) - with support for Symfony: ^4.4 and ^5.0 (PHP: ^7.2 & ^8.0).

            Support

            The bulk of the documentation is stored in the Resources/doc/index.md file in this bundle. Read the documentation for version:. This bundle contains support for 58 different providers: * 37signals, * Amazon, * Apple, * Asana, * Auth0, * Azure, * Bitbucket, * Bitly, * Box, * BufferApp, * Clever, * Dailymotion, * Deezer, * DeviantArt, * Discogs, * Disqus, * Dropbox, * EVE Online, * Facebook, * FI-WARE, * Flickr, * Foursquare, * Genius, * GitHub, * Google, * Hubic, * Instagram, * Itembase, * Jawbone, * JIRA, * Keycloak, * LinkedIn, * Mail.ru * Odnoklassniki, * Office365, * PayPal, * QQ, * RunKeeper, * Salesforce, * Sensio Connect, * Sina Weibo, * Slack, * Soundcloud, * Spotify, * Stack Exchange, * Stereomood, * Strava, * Toshl, * Trakt, * Trello, * Twitch, * Twitter, * VKontakte, * Windows Live, * Wordpress, * XING, * Yahoo, * Yandex, * Youtube.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/hwi/HWIOAuthBundle.git

          • CLI

            gh repo clone hwi/HWIOAuthBundle

          • sshUrl

            git@github.com:hwi/HWIOAuthBundle.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link