Skip to content

FusionAuth/fusionauth-example-php-connector

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PHP Legacy App

This repository contains a PHP legacy application with home rolled authentication. It's not very secure, any account with a password of 'password' is logged in.

Read the corresponding blog posts:

Prerequisites

Connector license

Note that Connectors are a feature available to FusionAuth installations with a paid edition. You can sign up for a 14 day free trial of the "Developer" Edition to test this functionality out.

Setup

  • Clone this repo and cd into it.
  • Run composer install.
  • Update the values in config.php.
  • Configure a Connector.
    • Set the authentication URL to be http://localhost:8000/fusionauthconnector.php (for production, please use TLS).
    • Set the header value of Authorization to supersecretauthheader or whatever authorization header you set in config.php.
  • Associate it with your tenant. Make sure you check the Migrate User checkbox.
  • Start a webserver: php -S 0.0.0.0:8000 . This should not be used for production.

To use

  • Go to http://localhost:8000 and login.
  • Users will who successfully authenticate will be migrated from the legacy application to FusionAuth.
  • If you reset a FusionAuth user's password (using the administrative user interface) to password2, that's what you'll have to use to login.

About

Example application for use with a generic Connector.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages