Using PHP to handle CAS logins (migrating from JSP) -


background:

we have functional cas implementation using jsp, want migrate php implementation.

currently, have central cas server authenticates user , redirects them landing page(in jsp), takes authentication data , passes onto third-party-application.

in jsp use following snippet retrieve user's data

string usr = request.getparameter("id"); string nid = session.getattribute("netid"); 

question

how retrieve information using php?

i have tried doing:

  • $_get
  • $_post
  • $_request
  • $_session

and more.

i have feeling may need install phpcas in order this, not want unless absolutely necessary.

thank time.

every consumer of cas service ticket needs able validate token, parse response, etc. seems you're using jsp-based cas client doing work you? (possibly yale's, jasig 1 not deal jsp). if want switch client non-jsp/java application, php one, best option protect page/client application phpcas. phpcas intercept ticket in url, validate against cas server , set appropriate session variables.

here's simple example of phpcas in action: https://github.com/jasig/phpcas/blob/master/docs/examples/example_simple.php

alternatively, can write own interception/validation/parsing code, since security product, recommend using 1 of well-known/tested clients.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -