Skip to content

Commit

Permalink
updated openid lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Pfefferle committed Jan 12, 2018
1 parent a50189e commit f5755eb
Show file tree
Hide file tree
Showing 43 changed files with 1,376 additions and 483 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.DS_Store
23 changes: 22 additions & 1 deletion lib/Auth/OpenID.php 100644 → 100755
Expand Up @@ -117,6 +117,8 @@ class Auth_OpenID {
* false if not.
*
* @access private
* @param object|string $thing
* @return bool
*/
static function isFailure($thing)
{
Expand All @@ -141,6 +143,8 @@ static function isFailure($thing)
* http://lists.openidenabled.com/pipermail/dev/2007-March/000395.html
*
* @access private
* @param string|null $query_str
* @return array
*/
static function getQuery($query_str=null)
{
Expand Down Expand Up @@ -203,6 +207,8 @@ static function params_from_string($str)
* true if the operation succeeded; false if not.
*
* @access private
* @param string $dir_name
* @return bool
*/
static function ensureDir($dir_name)
{
Expand All @@ -225,6 +231,9 @@ static function ensureDir($dir_name)
* array containing the prefixed values.
*
* @access private
* @param array $values
* @param string $prefix
* @return array
*/
static function addPrefix($values, $prefix)
{
Expand All @@ -241,6 +250,10 @@ static function addPrefix($values, $prefix)
* or return $default if the key is absent.
*
* @access private
* @param array $arr
* @param string $key
* @param mixed $fallback
* @return mixed
*/
static function arrayGet($arr, $key, $fallback = null)
{
Expand All @@ -261,6 +274,9 @@ static function arrayGet($arr, $key, $fallback = null)

/**
* Replacement for PHP's broken parse_str.
*
* @param string|null $query
* @return array|null
*/
static function parse_str($query)
{
Expand Down Expand Up @@ -435,14 +451,16 @@ static function normalizeUrl($url)
if ($normalized === null) {
return null;
}
list($defragged, $frag) = Auth_OpenID::urldefrag($normalized);
list($defragged) = Auth_OpenID::urldefrag($normalized);
return $defragged;
}

/**
* Replacement (wrapper) for PHP's intval() because it's broken.
*
* @access private
* @param string|int $value
* @return bool|int
*/
static function intval($value)
{
Expand Down Expand Up @@ -470,6 +488,9 @@ static function bytes($str)
/**
* Get the bytes in a string independently of multibyte support
* conditions.
*
* @param string $str
* @return array
*/
static function toBytes($str)
{
Expand Down

0 comments on commit f5755eb

Please sign in to comment.