How to set up an OpenID Connect client in Laravel? - php

What is the best way to get an OpenID Connect client flow going in the PHP Laravel framework? I have looked at socialite but that does not support OpenID Connect.

I ended up doing the flow myself, the lib I used in the end was https://github.com/jumbojett/OpenID-Connect-PHP - was a nice and simple to get up and running

Related

How can I integrate Keycloak SSO with Php application?

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.

IdentityServer3 and php

How to connect identityServer3 to php application. I have application in asp.net MVC which is using IDS3 now i need to connect php client app with SSO integration base on IDS3.
I think this is less a question about IdentityServer3, and more a question of what OpenID Connect libraries are recommended for PHP.
http://openid.net/developers/libraries/
The OpenID web site lists three OIDC libraries for relying parties - the right one to choose depends on your web server (nginx, Apache) and application stack (e.g. Drupal).
Recommend you try the most lightweight first and see if it supports what you need.
https://github.com/jumbojett/OpenID-Connect-PHP
I am implementing same type of auth but get client secret validator error, do you have any docs? I m using openid-oauth2 library

Fuelphp with OAuth2 php server library

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.

Web service for sharing DB details

we have already developed a web app using codeigniter and now planning a mobile client(for android phones).The scenario is like this
1)mobile client will have a local db same as server db
2)After installing the app an authentication process is there
3)After authentication we need to download the data from server db to mobile client DB.
I have created one web service using REST api for authentication process and its working but for step 3 i need help.
Can i use REST api for that also or is there exist any other secure mechanism to sync server and mobile client DB ?
Can anyone suggest please!
Best regards,
First, you need create a very strong structure compatible with Oauth2, I recommended this library: Codeigniter RESTserver
After, you must know how works the Oauth2 protocol and implements it.
Read this tutorial, is old but good for your work: http://code.tutsplus.com/tutorials/working-with-restful-services-in-codeigniter--net-8814

Single login, multiple application authentication

Is there a Codeigniter authentication server that's available for use? Trying to get a multi-application service going similar to Basecamp and I don't want to reinvent the wheel. Alternatively, are there any respectable resources that deal with this kind of authentication?
Thanks!
You should be able to create a user db, and authentication library to do the job.
TankAuth maybe?
You can have 2 applications either seperately installed, or sharing a CI installation using the same library and authentication database. I'd keep everything else application specific, just share profile and login information.
Or, you can implement an OpenID service and have all of your CI applications connect via openid. This is the way StackOverflow does it. I'd google "codeigniter openid" to see what's available. here's a sampling:
http://thinkmoult.com/2009/02/22/use-codeigniter-openid-library-to-integrate-openid/
http://codeigniter.com/wiki/OpenID
Facebook connect offers good authentication possibilities. Also Google, Yahoo! and many other big sites offers similar posibilities.
If you mean that you want some form of 'register at one site get them all'-service, all you need to do is point the authentication to the same database on all sites.
Another posibility is making an authentication page then using cURL or AJAX to check authentication.

Categories