Best way to create a composer package that installs a Provider to provide third party API integration
Hey all,
New to Laravel so I'm not quite sure how to handle this and search results haven't yielded much for my specific use case.
The end objective is to create an installable Composer package that does a few things:
- Create a route called /custom-route that will authenticate a URL param passed "token" with a specific service URL (will be different per environment (ex: local/prod))
- Tie into Laravel's Auth Facade so we can authenticate and resolve to a User any calls to the API group using the Authorization token header.
I have it working now using Middleware and building onto the local Auth provider but, to make it an installable package, I may need to refactor these things. I'm not sure.
Thanks in advance.
submitted by /u/djcecil2
[link] [comments]
from Laravel Questions and Answers https://laravelquestions.com/rlaravel/best-way-to-create-a-composer-package-that-installs-a-provider-to-provide-third-party-api-integration/
via Lzo Media
No comments:
Post a Comment