I'm trying to implement Oauth2 server library into my fuelphp api. I've been following this tutorial and this one.
I understood and was able to complete the 2nd tutorial, but that doesn't deal with integrating OAuth into Fuelphp.
What I'm wondering, is how to integrate OAuth2 into my api, I just want to replicated a login? Has anyone any other tutorials on how to do this?
Where in my fuelphp directories do I put the Server/ token/ authorization code?
Thanks very much
FuelPHP uses OPauth under the hood and it's use is documented in the official Fuel docs
The server tokens, authorization codes, etc are stored in the opauth.php config file.
Related
I am very new to keycloak which is open source that provides authentication to our app.
I have my simple php app and I need to integrate the Keycloak SSO feature with my php app.
I did some research on google that keycloak does not provide any adapter to integrate with php app.
But I found an adapter on github Aatccama/keycloak-adapter-php.
This is repo link : Keycloak php adapter
But I did not understand how to use it.
Can anyone guide me?
You can use any OpenId connect library you want to use Keycloak with PHP. Do a Google search on openid connect php and you will find a multitude of libraries and tutorials.
On your second question I suggest to delve into the Keycloak documentation itself before you put any auth solution online.
A basic knowledge of DevOps is required so I suggest you also look into that topic for deploying and managing a server as Keycloak can be deployed in many ways depending on your own preferences.
You have a example to guide more with sso-keycloak-php repo.
I'm currently working on a CakePHP 3 application, trying to connect to Microsoft Azure using OAuth2. To this end, I'm trying to integrate the UseMuffin OAuth2 plugin. However, I'm struggling with the documentation. It seems to describe how to configure the plugin, but not how to actually use it. What methods do I call and how when I want to initiate an OAuth2 authentication? I'm somewhat familiar with OAuth2 itself, already wrote a little stand-alone PHP script that successfully authenticates using Curl. I'm just not sure how the UseMuffin plugin can help.
To be clear, the CakePHP 3 application I'm working on already has its own authentication scheme. I just want some users (not all) that are already authenticated with my application, to connect with Azure, so we can exchange information. I'm not sure the UseMuffin plugin can work alongside an existing means of authentication?
I am developing a website in laravel 5.1. I need to write code which will communicate with some other system using API call. Other system is projected by oAuth. So I first need to authenticate my system using oAuth and then i can make the api.
I am not sure how i can achieve this in laravel. Any help on this is highly appreciated.
There are multiple ways you can achieve your goal.
Laravel Specific Method
There are many packages for handling oAuth Authentication.. e.g. OAuth Service Provider for Laravel 5 from github. You can search similar other packages and use them.
Guzzle
As you need to call the api anyway after the authentication, you need CURL or other packages to do the call. Here Guzzle can help you. Also you can use Guzzle to code your full oAuth Authentication.
Plain PHP Method
You can use OAuth class library to code the oAuth Authentication OR use CURL
Personally I've used Guzzle only to get the Code, Access Token, Refresh Token etc. I hope you'll manage to use Guzzle for this purpose.
You should take a look at laravel/socialite and its documentation here.
This library currently supports Facebook, Twitter, LinkedIn, Google, GitHub and Bitbucket, but it will be pretty easy to create your own custom provider. Just take a look at source code on github.
Other than this you could use some standalone OAuth library like league/oauth2-client. There is also library dedicated for first version of OAuth.
I am trying to create an app for Basecamp. I managed to connect and pull data using curl (Basecamp API using cURL and PHP). However this requires the users login data.
I would like to use OAuth2 with Basecamp as in https://github.com/37signals/api/blob/master/sections/authentication.md. Unfortunately there is 0 documentation on this and I couldnt find any sample code. I saw there are several OAuth2 libraries http://oauth.net/code/, but I have no idea what to do with them.
Can somebody please show me some php sample code of how I would authenticate a user using OAuth2 in php and than make a request to the Basecamp API?
Thank you very much in advance.
I recently had to implement OAuth 2.0 for our company. I was also browsing the web to try and find information on the topic. I came across these two websites, which helped alot.
OAuth 2.0 Implementation Example
Online Screencast
Hope this helps.
Right now m developing a web app which acts as a consumer for http://salesforce.com but I am unable to make a controller for the API implementation.
Can anyone provide me the php library for salesforce oauth2.0 REST API...?
I have recently Open Sourced a Cakephp 2.x datasource I have created to interact with Salesforce Enterprise - not sure if its suitable for what you want as you havent specified whether you are using a framework or not but take a look:
CakePHP Salesforce Enterprise Datasource
This uses the developerforce PHP toolkit as mentioned in some other posts but simplifies a whole lot of things!
I don't believe there is anything official, but you can take a look at the Salesforce REST API client used in Workbench (PHP-based app) to get you started:
http://code.google.com/p/forceworkbench/source/browse/trunk/workbench/restclient/RestClient.php