• This repository has been archived on 24/Jul/2023
  • Stars
    star
    755
  • Rank 60,125 (Top 2 %)
  • Language
    PHP
  • License
    Apache License 2.0
  • Created over 14 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OpenID library for PHP5

PHP OpenID

This is the PHP OpenID library by JanRain, Inc. You can visit our website for more information about this package and other OpenID implementations and tools:

http://www.openidenabled.com/

Getting Started

First, run the examples/detect.php script either from the command line or via the web. It will generate a report of any system configuration changes necessary to run the library.

Installation

You will need PHP 5.6.0 or greater to use this library.

Follow these steps:

  1. Install dependencies.

    • Enable either the GMP extension or Bcmath extension. (GMP is STRONGLY recommended because it's MUCH faster!) This is required.

    • Enable the CURL extension.

    • If you plan to use SQLite, PostgreSQL, or MySQL to store OpenID data, you'll need PEAR MDB2. You can install this by running this as root:

      pear install MDB2

      You'll also need to install and enable the appropriate PHP database extension. Alternatively, you can store OpenID data on the filesystem instead of using a relational database. Nothing special is required for using the filesystem method.

    • Install either the DOM or domxml PHP XML processing extension, but not both (they are incompatible).

  2. Copy the Auth/ directory into your PHP include path.

Testing Your Setup

You can use the example code to test your setup. To run the example consumer or server, follow the instructions in the examples/README.md file.

Using the API

The best way to get started using the API is to take a look at the example consumer and server in the examples/ directory. See the examples/README.md file for more details.

Troubleshooting

  • If you're unable to use an OpenID URL with the library, you may want to try using the discover tool (examples/discover.php). This tool will perform OpenID discovery on the identifier and give a list of discovered OpenID services and their types.

  • On some systems, PHP basedir restrictions prevent web servers from opening a source of randomness, such as /dev/urandom. If your PHP OpenID library has trouble getting a satisfactory source of randomness, check your Apache and PHP configurations to be sure that the randomness source is in the list of allowed paths for the open_basedir option.

  • In some cases, bugs in the GMP math library will result in signature validation errors when using this library. Since GMP is preferred over bcmath (for performance), you will have to define Auth_OpenID_BUGGY_GMP in your application before importing any of the library code:

define('Auth_OpenID_BUGGY_GMP', true);
  • Not all PHP installations support SSL. You can find out if yours supports SSL by reading the "HTTP Fetching" section of the output of examples/detect.php. If your installation does not support SSL, then https:// identity URLs and server URLs will not be supported by the library. An attempt to use such an identity URL will be equivalent to using an invalid OpenID. To enable SSL support, recompile PHP with OpenSSL support or install the appropriate OpenSSL module for your platform. If you are using CURL, CURL will need to be built with OpenSSL support.

Getting Help

If you have any questions, recommendations, or patches, please tell us! Subscribe to our OpenID development discussion list at

https://openid.net/developers/dev-mailing-lists/

Documentation

You can view the HTML library documentation in the doc/ directory.

This package's documentation is in PhpDoc format. To generate the documentation, install phpdoc and run the admin/makedoc.sh script. Phpdoc lives at:

https://www.phpdoc.org/

Contributing

If you have a bugfix or feature you'd like to contribute, don't hesitate to send it to us. Post your patch to the development list at

https://openid.net/developers/dev-mailing-lists/

For more detailed information on how to contribute, see

http://openidenabled.com/contribute/

To run the test suite included with this package, install PHPUnit 1.x and run

php admin/texttest.php

PHPUnit 1.x can be found at

http://pear.phpunit.de/get/

More Repositories

1

AppAuth-Android

Android client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
Java
2,848
star
2

AppAuth-iOS

iOS and macOS SDK for communicating with OAuth 2.0 and OpenID Connect providers.
Objective-C
1,758
star
3

AppAuth-JS

JavaScript client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
TypeScript
982
star
4

python-openid

OpenID library for Python
Python
439
star
5

ruby-openid

OpenID library for Ruby
Ruby
315
star
6

OpenYOLO-Android

Android protocol for credential exchange and update - "You Only Login Once"
Java
115
star
7

OpenYOLO-Web

Web protocol for credential exchange and update - "You Only Login Once"
TypeScript
100
star
8

OpenID4VCI

68
star
9

OpenID4VP

Python
53
star
10

sharedsignals

OpenID Shared Signals Working Group Repository
Makefile
50
star
11

authzen

Proposed standard for an Authorization API
TypeScript
36
star
12

oid4vc-haip-sd-jwt-vc

High Assurance Profile of OID4VP and OID4VCI using SD-JWT VC and mdocs that is privacy preserving, secure, and meets regulatory requirements
Makefile
29
star
13

accountchooser

Promotional website for Account Chooser.
22
star
14

connect-site

The OpenID Connect site.
PHP
13
star
15

openid.github.com

JavaScript
13
star
16

OpenYOLO-Spec

The markdown source of the OpenYOLO Specification
XSLT
11
star
17

SIOPv2

8
star
18

accountchooser.com

Source code for accountchooser.com, a project of the OIDF Account Chooser Working Group
JavaScript
8
star
19

federation

8
star
20

openid4vp_ble

HTML
7
star
21

php4-openid

OpenID library for PHP4
PHP
6
star
22

Contract-Exchange-Extension

The (draft) OpenID Contract Exchange Extension specification.
HTML
6
star
23

User-Experience-Extension

The (draft) OpenID User Experience Extension specification.
6
star
24

OpenID4VC_SecTrust

Makefile
5
star
25

jwtconnect.io

HTML
3
star
26

ipsie

OpenID IPSIE Working Group Repository
1
star