passport-custom-request-grant | Custom Request Grant for Laravel Passport | REST library

 by   mikemclin PHP Version: 1.0.1 License: No License

kandi X-RAY | passport-custom-request-grant Summary

kandi X-RAY | passport-custom-request-grant Summary

passport-custom-request-grant is a PHP library typically used in Web Services, REST applications. passport-custom-request-grant has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

Custom Request Grant for Laravel Passport
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              passport-custom-request-grant has a low active ecosystem.
              It has 33 star(s) with 16 fork(s). There are 2 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 1 open issues and 2 have been closed. On average issues are closed in 220 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of passport-custom-request-grant is 1.0.1

            kandi-Quality Quality

              passport-custom-request-grant has 0 bugs and 0 code smells.

            kandi-Security Security

              passport-custom-request-grant has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              passport-custom-request-grant code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              passport-custom-request-grant does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              passport-custom-request-grant releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              passport-custom-request-grant saves you 34 person hours of effort in developing the same functionality from scratch.
              It has 91 lines of code, 8 functions and 2 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed passport-custom-request-grant and discovered the below as its top functions. This is intended to give you an instant insight into passport-custom-request-grant implemented functionality, and help decide if they suit your requirements.
            • Respond to an access token
            • Get user entity by request .
            • Validate the user .
            • Make a custom request grant .
            • Boot the application .
            • Get unique identifier .
            • Register plugin .
            Get all kandi verified functions for this library.

            passport-custom-request-grant Key Features

            No Key Features are available at this moment for passport-custom-request-grant.

            passport-custom-request-grant Examples and Code Snippets

            No Code Snippets are available at this moment for passport-custom-request-grant.

            Community Discussions

            Trending Discussions on passport-custom-request-grant

            QUESTION

            What is the proper way to implement a custom Laravel passport grant?
            Asked 2019-Dec-24 at 14:16

            I have been tinkering with the laravel passport and i can not seem to implement a custom grant type. I am using laravel 5.6 with passport 6.0 . After research, i created a CustomRequestGrantProvider and a CustomRequestGrant likewise in this CustomGrant library but i had no luck and every time i would make a POST request to localhost:8000/oauth/token with grant_type, client_id and client_secret

            ...

            ANSWER

            Answered 2019-Dec-24 at 14:16

            So i ended up creating custom classes that implement the original classes (Take a look at the picture below).

            The classes needed from the laravel/passport trait are the classes in the picture below with out the Custom in the beginning.

            For the CustomUserRepositoryInterface, you only need to modify UserRepositoryInterface, if for example you need to send an extra parameter to the laravel post request.

            This gave me the ability to customize laravel passport heavily, like for example passing multiple account types that have different ways of accessing the app(like sign in with phone number, email, facebook_token and id).

            I am sorry that i did not go thoroughly into the answer, but i was thinking of creating a library and sharing my work on github and off course update the answer and share the link, but non the less, these are the only classes you need to alter to achieve such result.

            Have a splendid day :)

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install passport-custom-request-grant

            Install with composer... composer require mikemclin/passport-custom-request-grant.
            Add MikeMcLin\Passport\CustomRequestGrantProvider to your list of providers after Laravel\Passport\PassportServiceProvider.
            Add byPassportCustomRequest($request) method to your User model (or whatever model you have configured to work with Passport). The method should accept an Illuminate\Http\Request object. You should authorize and retrieve user based on this request If you find that the request met your requirement, return the User model. If the request did not satisfy your requirement, return null

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            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/mikemclin/passport-custom-request-grant.git

          • CLI

            gh repo clone mikemclin/passport-custom-request-grant

          • sshUrl

            git@github.com:mikemclin/passport-custom-request-grant.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

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by mikemclin

            angular-acl

            by mikemclinJavaScript

            laravel-wp-password

            by mikemclinPHP

            ifttt-maker-webhooks

            by mikemclinPHP

            angular-responsive-elements

            by mikemclinJavaScript

            php-acl

            by mikemclinPHP