From 8e7e488ffe92030707a792584adecc93cd9a3708 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 10 Oct 2014 00:13:00 -0700 Subject: doc updates --- doc/html/auth_8php.html | 65 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 16 deletions(-) (limited to 'doc/html/auth_8php.html') diff --git a/doc/html/auth_8php.html b/doc/html/auth_8php.html index e2e1408e2..11577f332 100644 --- a/doc/html/auth_8php.html +++ b/doc/html/auth_8php.html @@ -110,24 +110,35 @@ $(document).ready(function(){initNavTree('auth_8php.html','');});
auth.php File Reference
+ +

Functions and inline functionality for authentication. +More...

+ + - - + + +

Functions

 nuke_session ()
 Resets the current session. More...
 
 account_verify_password ($email, $pass)
 Verify login credentials. More...
 
if((x($_POST,'auth-params'))&&$_POST['auth-params']===
-'login') 
match_openid ($authid)
 
if((x($_POST, 'auth-params'))&&$_POST['auth-params']===
+'login') 
match_openid ($authid)
 Returns the channel_id for a given openid_identity. More...
 
- - + +

Variables

if((isset($_SESSION))&&(x($_SESSION,'authenticated'))&&((!(x($_POST,'auth-params')))||($_POST['auth-params']!==
-'login'))) 
else
 
if((isset($_SESSION))&&(x($_SESSION,
+'authenticated'))&&((!(x($_POST,
+'auth-params')))||($_POST['auth-params']!==
+'login'))) 
else
 
-

Function Documentation

+

Detailed Description

+

Functions and inline functionality for authentication.

+

This file provides some functions for authentication handling and inline functionality. Look for auth parameters or re-validate an existing session also handles logout. Also provides a function for OpenID identiy matching.

+

Function Documentation

@@ -151,20 +162,28 @@ Variables
-

Verify login credentials

-

Returns account record on success, null on failure

+ +

Verify login credentials.

+
Parameters
+ + + +
string$emailThe email address to verify.
string$passThe provided password to verify.
+
+
+
Returns
array|null Returns account record on success, null on failure.

A plugin indicates successful login by setting 'authenticated' to non-zero value and returning a user record Plugins should never set 'authenticated' except to indicate success - as hooks may be chained and later plugins should not interfere with an earlier one that succeeded.

Referenced by api_login(), removeaccount_post(), removeme_post(), and RedBasicAuth\validateUserPass().

- +
- + @@ -173,6 +192,17 @@ Variables
if ((x($_POST,'auth-params'))&&$_POST['auth-params']=== 'login') match_openid if ((x($_POST, 'auth-params'))&&$_POST['auth-params']=== 'login') match_openid (   $authid)
+

Returns the channel_id for a given openid_identity.

+

Queries the values from pconfig configuration for the given openid_identity and returns the corresponding channel_id.

+

How do we prevent that an OpenID identity is used more than once?

+
Parameters
+ + +
string$authidThe given openid_identity
+
+
+
Returns
int|bool Return channel_id from pconfig or false.
+

Referenced by openid_content().

@@ -190,30 +220,33 @@ Variables
+

Resets the current session.

+
Returns
void
+

Referenced by api_account_logout().

Variable Documentation

- +
- +
if ((isset($_SESSION))&&(x($_SESSION,'authenticated'))&&((!(x($_POST,'auth-params')))||($_POST['auth-params']!== 'login'))) elseif ((isset($_SESSION))&&(x($_SESSION, 'authenticated'))&&((!(x($_POST, 'auth-params')))||($_POST['auth-params']!== 'login'))) else
Initial value:
{
if(isset($_SESSION)) {
- +
}
-
if((x($_POST,'password')) && strlen($_POST['password']))
-
$encrypted = hash('whirlpool',trim($_POST['password']))
+
if((x($_POST, 'password')) && strlen($_POST['password']))
+
$encrypted = hash('whirlpool', trim($_POST['password']))

Inline - not a function look for auth parameters or re-validate an existing session also handles logout

-- cgit v1.2.3