php


Is it possible to use a WordPress session to authenticate to a CakePHP application?


What is the best way to use a successful WordPress sign-in attempt to authenticate to a CakePHP application? I don't want to use password synchronization, if at all possible. I'd prefer to keep all of the user details within the WordPress database tables. I've been rolling this over in my mind this weekend and can't think of a good solution. Any ideas?
Assuming here that you're talking about your own Wordpress install, rather than hosted Wordpress.
If you're WordPress savvy, you could hack the WP authentication mechanism. I bet you could call a Cakephp URL from within the WP auth method, posting the necessary login info to Cakephp. You'd also have to set your Auth mechanisms fields attribute, so that Cake::Auth would know to pull the user information from the Wordpress database.
It could work.
Sometimes it can't be avoided, but hacking the core of an application that you will need to patch regularly is guaranteed to create tons of pain. I would suggest something like OPENID as an alternative.
You can use this Wordpress plug-in:
http://wordpress.org/extend/plugins/openid/
to allow OPENID logins in your Wordpress blog.
Then you need just need to install OPENID support into your CakePHP application authentication routine. Here is a tutorial I found:
http://cakebaker.42dh.com/2008/02/06/new-version-of-the-openid-component/

Related Links

PHPMailer Duplicate Emails
Using curl from command line works, but not when executing it in PHP (CURLE_RECV_ERROR 56)
Laravel 5.2 SQLSTATE[42S02]: Base table or view not found: 1146 Table
Facebook SDK array profile
Keep values of dropdown list after failed form verification CI
In a PHP MVC, what's the correct way of passing controller data to model classes?
Multi Curl one url returns null
mysql query to get some table/array
Redirecting php script adding log file size
YII fails to read BIGINT in Postgres 9.4. Silently converts to MAX_INT. Works in 9.5
Laravel 5.2 project artisan error
Rounding floats within an aggregate function in PHP?
How to open an edit form using post request between postback using laravel 5.2
check different nodes and echo accordingly
php datatable array results
php mysql database fetching of data only once

Categories

HOME
cocoapods
webview
cucumber
android-fragments
mousemove
hdfs
celery
autocomplete
lvm
openflow
tfs2015
hyperledger
share
stored-procedures
gprs
specifications
sharepoint-online
phpstorm-2017.1
graphdb
buffer
jquery-select2-4
freertos
google-awareness
squirrel-sql
async-await
uima
coroutine
salt-cloud
amazon-mws
activeadmin
kaggle
ini
react-dnd
nurbs
tortoisemerge
region
openbr
envoy
xenapp
location-services
progid
universal
advanced-filter
serversocket
image-optimization
dreamfactory
textmate2
subclassing
formsauthenticationticket
redgate
aurelia-cli
telephonymanager
python-jira
pyttsx
sendinput
react-intl
music21
tinyioc
xcglogger
uiautomatorviewer
asp.net-web-api-routing
email-forwarding
oid
google-identity-toolkit
visual-studio-monaco
timestamping
utf-16
gridbaglayout
taco
django-validation
webgrind
largenumber
astropy
fanotify
dsa
ambiguity
bjam
explain
componentart
erlog
scala-macros
fat32
nanomsg
iplimage
nachos
preorder
typesafe-stack
django-sites
code39
lsa
django-settings
visual-c++-2005
colon
discovery
ggts
frontbase
stty
reentrancy
itunes-sdk
gprof
workflow-manager-1.x
voice-recording
kobold2d
acpi
expression-web
kernel32
css-friendly
servlet-container
django-pagination
multiple-users

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App