Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the php-openid library #14

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions lib/php-openid/Auth/OpenID/AX.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function Auth_OpenID_AX_checkAlias($alias)
* @package OpenID
*/
class Auth_OpenID_AX_Error {
function Auth_OpenID_AX_Error($message=null)
function __construct($message=null)
{
$this->message = $message;
}
Expand Down Expand Up @@ -151,7 +151,7 @@ class Auth_OpenID_AX_AttrInfo {
* @param string $alias The name that should be given to this
* attribute in the request.
*/
function Auth_OpenID_AX_AttrInfo($type_uri, $count, $required,
function __construct($type_uri, $count, $required,
$alias)
{
/**
Expand Down Expand Up @@ -269,7 +269,7 @@ class Auth_OpenID_AX_FetchRequest extends Auth_OpenID_AX_Message {

var $mode = 'fetch_request';

function Auth_OpenID_AX_FetchRequest($update_url=null)
function __construct($update_url=null)
{
/**
* requested_attributes: The attributes that have been
Expand Down Expand Up @@ -540,7 +540,7 @@ function contains($type_uri)
*/
class Auth_OpenID_AX_KeyValueMessage extends Auth_OpenID_AX_Message {

function Auth_OpenID_AX_KeyValueMessage()
function __construct()
{
$this->data = array();
}
Expand Down Expand Up @@ -793,9 +793,9 @@ function count($type_uri)
class Auth_OpenID_AX_FetchResponse extends Auth_OpenID_AX_KeyValueMessage {
var $mode = 'fetch_response';

function Auth_OpenID_AX_FetchResponse($update_url=null)
function __construct($update_url=null)
{
$this->Auth_OpenID_AX_KeyValueMessage();
parent::__construct();
$this->update_url = $update_url;
}

Expand Down Expand Up @@ -990,7 +990,7 @@ function make($succeeded=true, $error_message=null)
return new Auth_OpenID_AX_StoreResponse($succeeded, $error_message);
}

function Auth_OpenID_AX_StoreResponse($succeeded=true, $error_message=null)
function __construct($succeeded=true, $error_message=null)
{
if ($succeeded) {
$this->mode = $this->SUCCESS_MODE;
Expand Down
4 changes: 2 additions & 2 deletions lib/php-openid/Auth/OpenID/Association.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static function fromExpiresIn($expires_in, $handle, $secret, $assoc_type)
* this time is 'HMAC-SHA1' and 'HMAC-SHA256', but new types may
* be defined in the future.
*/
function Auth_OpenID_Association(
function __construct(
$handle, $secret, $issued, $lifetime, $assoc_type)
{
if (!in_array($assoc_type,
Expand Down Expand Up @@ -523,7 +523,7 @@ function Auth_OpenID_getEncryptedNegotiator()
* @package OpenID
*/
class Auth_OpenID_SessionNegotiator {
function Auth_OpenID_SessionNegotiator($allowed_types)
function __construct($allowed_types)
{
$this->allowed_types = array();
$this->setAllowedTypes($allowed_types);
Expand Down
18 changes: 9 additions & 9 deletions lib/php-openid/Auth/OpenID/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class Auth_OpenID_Consumer {
* when creating the internal consumer object. This is used for
* testing.
*/
function Auth_OpenID_Consumer($store, $session = null,
function __construct($store, $session = null,
$consumer_cls = null)
{
if ($session === null) {
Expand Down Expand Up @@ -456,7 +456,7 @@ class Auth_OpenID_DiffieHellmanSHA1ConsumerSession {
var $secret_size = 20;
var $allowed_assoc_types = array('HMAC-SHA1');

function Auth_OpenID_DiffieHellmanSHA1ConsumerSession($dh = null)
function __construct($dh = null)
{
if ($dh === null) {
$dh = new Auth_OpenID_DiffieHellman();
Expand Down Expand Up @@ -611,7 +611,7 @@ class Auth_OpenID_GenericConsumer {
* in the module description. The default value is False, which
* disables immediate mode.
*/
function Auth_OpenID_GenericConsumer($store)
function __construct($store)
{
$this->store = $store;
$this->negotiator = Auth_OpenID_getDefaultNegotiator();
Expand Down Expand Up @@ -1757,7 +1757,7 @@ class Auth_OpenID_AuthRequest {
* class. Instances of this class are created by the library when
* needed.
*/
function Auth_OpenID_AuthRequest($endpoint, $assoc)
function __construct($endpoint, $assoc)
{
$this->assoc = $assoc;
$this->endpoint = $endpoint;
Expand Down Expand Up @@ -2036,7 +2036,7 @@ class Auth_OpenID_SuccessResponse extends Auth_OpenID_ConsumerResponse {
/**
* @access private
*/
function Auth_OpenID_SuccessResponse($endpoint, $message, $signed_args=null)
function __construct($endpoint, $message, $signed_args=null)
{
$this->endpoint = $endpoint;
$this->identity_url = $endpoint->claimed_id;
Expand Down Expand Up @@ -2139,7 +2139,7 @@ function getReturnTo()
class Auth_OpenID_FailureResponse extends Auth_OpenID_ConsumerResponse {
var $status = Auth_OpenID_FAILURE;

function Auth_OpenID_FailureResponse($endpoint, $message = null,
function __construct($endpoint, $message = null,
$contact = null, $reference = null)
{
$this->setEndpoint($endpoint);
Expand All @@ -2164,7 +2164,7 @@ class Auth_OpenID_TypeURIMismatch extends Auth_OpenID_FailureResponse {
* @package OpenID
*/
class Auth_OpenID_ServerErrorContainer {
function Auth_OpenID_ServerErrorContainer($error_text,
function __construct($error_text,
$error_code,
$message)
{
Expand Down Expand Up @@ -2202,7 +2202,7 @@ static function fromMessage($message)
class Auth_OpenID_CancelResponse extends Auth_OpenID_ConsumerResponse {
var $status = Auth_OpenID_CANCEL;

function Auth_OpenID_CancelResponse($endpoint)
function __construct($endpoint)
{
$this->setEndpoint($endpoint);
}
Expand All @@ -2228,7 +2228,7 @@ function Auth_OpenID_CancelResponse($endpoint)
class Auth_OpenID_SetupNeededResponse extends Auth_OpenID_ConsumerResponse {
var $status = Auth_OpenID_SETUP_NEEDED;

function Auth_OpenID_SetupNeededResponse($endpoint,
function __construct($endpoint,
$setup_url = null)
{
$this->setEndpoint($endpoint);
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/DiffieHellman.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Auth_OpenID_DiffieHellman {
var $private;
var $lib = null;

function Auth_OpenID_DiffieHellman($mod = null, $gen = null,
function __construct($mod = null, $gen = null,
$private = null, $lib = null)
{
if ($lib === null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/Discover.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function Auth_OpenID_getOpenIDTypeName($type_uri) {
* Object representing an OpenID service endpoint.
*/
class Auth_OpenID_ServiceEndpoint {
function Auth_OpenID_ServiceEndpoint()
function __construct()
{
$this->claimed_id = null;
$this->server_url = null;
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/DumbStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Auth_OpenID_DumbStore extends Auth_OpenID_OpenIDStore {
* @param string secret_phrase The phrase used to create the auth
* key returned by getAuthKey
*/
function Auth_OpenID_DumbStore($secret_phrase)
function __construct($secret_phrase)
{
$this->auth_key = Auth_OpenID_SHA1($secret_phrase);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/php-openid/Auth/OpenID/FileStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Auth_OpenID_FileStore extends Auth_OpenID_OpenIDStore {
* @param string $directory This is the directory to put the store
* directories in.
*/
function Auth_OpenID_FileStore($directory)
function __construct($directory)
{
if (!Auth_OpenID::ensureDir($directory)) {
trigger_error('Not a directory and failed to create: '
Expand Down Expand Up @@ -482,7 +482,7 @@ function _rmtree($dir)
}

if ($handle = opendir($dir)) {
while ($item = readdir($handle)) {
while (false !== ($item = readdir($handle))) {
if (!in_array($item, array('.', '..'))) {
if (is_dir($dir . $item)) {

Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/MDB2Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Auth_OpenID_MDB2Store extends Auth_OpenID_OpenIDStore {
* the name of the table used for storing nonces. The default
* value is 'oid_nonces'.
*/
function Auth_OpenID_MDB2Store($connection,
function __construct($connection,
$associations_table = null,
$nonces_table = null)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/MemcachedStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Auth_OpenID_MemcachedStore extends Auth_OpenID_OpenIDStore {
*
* @param resource connection Memcache connection resourse
*/
function Auth_OpenID_MemcachedStore($connection, $compress = false)
function __construct($connection, $compress = false)
{
$this->connection = $connection;
$this->compress = $compress ? MEMCACHE_COMPRESSED : 0;
Expand Down
6 changes: 3 additions & 3 deletions lib/php-openid/Auth/OpenID/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Auth_OpenID_Mapping {
* Initialize a mapping. If $classic_array is specified, its keys
* and values are used to populate the mapping.
*/
function Auth_OpenID_Mapping($classic_array = null)
function __construct($classic_array = null)
{
$this->keys = array();
$this->values = array();
Expand Down Expand Up @@ -274,7 +274,7 @@ function contains($value)
* @package OpenID
*/
class Auth_OpenID_NamespaceMap {
function Auth_OpenID_NamespaceMap()
function __construct()
{
$this->alias_to_namespace = new Auth_OpenID_Mapping();
$this->namespace_to_alias = new Auth_OpenID_Mapping();
Expand Down Expand Up @@ -414,7 +414,7 @@ function isDefined($namespace_uri)
*/
class Auth_OpenID_Message {

function Auth_OpenID_Message($openid_namespace = null)
function __construct($openid_namespace = null)
{
// Create an empty Message
$this->allowed_openid_namespaces = array(
Expand Down
4 changes: 2 additions & 2 deletions lib/php-openid/Auth/OpenID/PAPE.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Auth_OpenID_PAPE_Request extends Auth_OpenID_Extension {
var $ns_alias = 'pape';
var $ns_uri = Auth_OpenID_PAPE_NS_URI;

function Auth_OpenID_PAPE_Request($preferred_auth_policies=null,
function __construct($preferred_auth_policies=null,
$max_auth_age=null)
{
if ($preferred_auth_policies === null) {
Expand Down Expand Up @@ -161,7 +161,7 @@ class Auth_OpenID_PAPE_Response extends Auth_OpenID_Extension {
var $ns_alias = 'pape';
var $ns_uri = Auth_OpenID_PAPE_NS_URI;

function Auth_OpenID_PAPE_Response($auth_policies=null, $auth_time=null,
function __construct($auth_policies=null, $auth_time=null,
$nist_auth_level=null)
{
if ($auth_policies) {
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/Parse.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Auth_OpenID_Parse {
var $_open_tag_expr = "<%s\b";
var $_close_tag_expr = "<((\/%s\b)|(%s[^>\/]*\/))>";

function Auth_OpenID_Parse()
function __construct()
{
$this->_link_find = sprintf("/<link\b(?!:)([^>]*)(?!<)>/%s",
$this->_re_flags);
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/PredisStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Auth_OpenID_PredisStore extends Auth_OpenID_OpenIDStore {
* @param \Predis\Client $redis Predis client object
* @param string $prefix Prefix for all keys stored to the Redis
*/
function Auth_OpenID_PredisStore(\Predis\Client $redis, $prefix = '')
function __construct(\Predis\Client $redis, $prefix = '')
{
$this->prefix = $prefix;
$this->redis = $redis;
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/SQLStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
* the name of the table used for storing nonces. The default
* value is 'oid_nonces'.
*/
function Auth_OpenID_SQLStore($connection,
function __construct($connection,
$associations_table = null,
$nonces_table = null)
{
Expand Down
2 changes: 1 addition & 1 deletion lib/php-openid/Auth/OpenID/SReg.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class Auth_OpenID_SRegResponse extends Auth_OpenID_SRegBase {

var $ns_alias = 'sreg';

function Auth_OpenID_SRegResponse($data=null,
function __construct($data=null,
$sreg_ns_uri=Auth_OpenID_SREG_NS_URI)
{
if ($data === null) {
Expand Down
Loading