Janrain Capture Demo
JavaScript PHP
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
fancybox initial import Jan 20, 2011
.gitignore .DS_Store in gitignore Nov 1, 2011
Capture.js multiple apps live together nicely, capture session persists, firefox… May 30, 2011
README.org initial import Jan 20, 2011
README.txt small improvement to the README Dec 11, 2011
api.php adding in the feature to let users pick how they want to do editProfi… Oct 27, 2011
change_password.php proper page load within the same iframe for password change Aug 25, 2011
common.php add notes in common.php to be consistent with the notes in the integr… Jan 7, 2012
config.php putting the null check back in for sso_servers[app] Nov 22, 2011
editprofile.php adding in the feature to let users pick how they want to do editProfi… Oct 27, 2011
example_config.ini putting back in support for multiple clients, and fixing the bugs tha… Nov 11, 2011
home.php adding in the feature to let users pick how they want to do editProfi… Oct 27, 2011
index.php Merge remote branch 'public/master' into public Nov 23, 2011
json2.js
logout.php
navigation.php putting back in support for multiple clients, and fixing the bugs tha… Nov 11, 2011
oauth_redirect.php small changes while testing sso Nov 4, 2011
policy.html mock policy page, referenced by terms_of_service_href or privacy_poli… Jul 12, 2011
prettyprint.js
profile_edit_finished.php adding in the feature to let users pick how they want to do editProfi… Oct 27, 2011
profile_with_token_refresh.php adding client ID to profile url generator Dec 1, 2011
public_profile.php added change password page and handling of email link redirection, ad… Jun 28, 2011
rawprofile.php Add iframe resize and syntax fix Mar 25, 2011
sso.php small changes while testing sso Nov 4, 2011
style.css Edit profile height increased and scrolling on. Ticket 2575 Jun 7, 2011
xdcomm.html updated xdcomm.js link Jan 22, 2013

README.org

Contact Information

Installation and Setup

Place the contents of this directory in a location accessible by your web server (e.g. /var/www).

Edit config.ini and set the variables client_id and client_secret. Change any other variables as you see fit.

Documentation

Top-level Files

Most top-level files behave something like this:

  • include apid.php.
  • render html header and page title.
  • include common.php.
  • retrieve the user entity and display the navigation bar by calling make_navigation_bar.
  • display the body.

index.php

Renders the main page by including ‘home.php’.

editprofile.php

Renders the profiler editor page if the user is logged in. Otherwise, displays a message that the user must login.

rawprofile.php

Pretty-prints the raw entity of the currently logged in user.

logout.php

Logs out the user by clearing the PHP capture_session variable.

Included Files

The following files should never be accessed directly by the user in a URL. They are included by the above top-level files.

common.php

Sources some javascript and includes navigation.php. Should be included by each of the top-level files before rendering the body of the page.

api.php

Provides Capture API functions. Includes config.php. Should be included at the top of every top-level file, before the html header.

config.php

Parses config.ini for options, provides a couple of debug functions.

config.ini

The configuration file.

navigation.php

Provides a function for rendering the navigation bar, make_navigation_bar. It takes in the user entity, which is NULL if the user is not logged in, and displays links based on whether the user is logged in.

home.php

Demo main page.

prettyprint.js

style.css

oauth_redirect.php

File that handles OAuth redirect. Must be loaded inside a frame. Accepts an authentication code and exchanges it with the server for an access token.

xdcomm.html

Required file. See the Janrain Capture Integration Document.