Uaacs_authentication

A class to incorporate UAACS into any new application.

IMPORTANT :- For logging out, a post var named "UAACS_logout" should be used with value "YES".

USAGE :-

      $uaacs = new Uaacs_authentication ;
      $uaacs->setLandingPage('http://bizydads.com/channa/portman/clientportfolio.php');
      $uaacs->setAccessKey('j2ghjlzivj8u');
      $uaacs->setSecurityKey('844c1cf009c169d456f5e22f4f3eb737') ;
      $uaacs->setAppId(58) ;
      $uaacs->setRoleId(456) ;
      //Following are optional
      $uaacs->setLogoutUrl('http://UAACS.kindersigns.org/API/logout.php');
      $uaacs->setLgnCheckUrl('http://UAACS.kindersigns.org/API/loginCheck.php');
      $uaacs->authenticate();
      $functions = $uaacs->getAllowedFunctions() ;  //An array
      $myRoles = $uaacs->getAllowedRoles();         //An array
      $roleId = $uaacs->getActiveRole();
      $data = $uaacs->getUserData();                //simpleXMLObject

      da: 28da7d
    dev sec key: 85d3c6ee8affbff
    ACK : yd064wqrbr9
    AS; : eec12d7215ad20eeb1cb4a7eabc9ba47
author

Channa Dewamitta channa@ekwa.com @created Sep 01, 2013 @modified on @modification @version V2.1.0

package

CommonObjects\Uaacs_authentication

Methods

Function __construct

__construct() 

Class constructor

access

public

since 2.0

Method to authenticate the user

authenticate() : void
access

public

Function getAccessKey

getAccessKey() : string

Gets the accesskey param

access

public

since 2.0

Response

string

access key of app

Function getActiveRole

getActiveRole() : integer

Gets the active role param

access

public

since 2.0

Response

integer

the active role ID

Function getAllowedFunctions

getAllowedFunctions() : string

Gets the allowed functions param

access

public

since 2.0

Response

string

list of allowed functions

Function getAllowedRoles

getAllowedRoles() : string

Gets the allowed roles param

access

public

since 2.0

Response

string

list of allowed roles

Function getAppId

getAppId() : string

Gets the application ID param

access

public

since 2.0

Response

string

application ID from UAACS

Function getLandingPage

getLandingPage() : string

Gets the landing page param

access

public

since 2.0

Response

string

URL of landing page

Function getLgnCheckUrl

getLgnCheckUrl() : string

Gets the login check script URL param

access

public

since 2.0

Response

string

url of login checking script in UAACS

Function getLogoutUrl

getLogoutUrl() : string

Gets the logout script URL param

access

public

since 2.0

Response

string

url of logout script in UAACS

Function getRoleId

getRoleId() 

Get the role ID param @@return string role ID from UAACS

access

public

since 2.0

Function getSecurityKey

getSecurityKey() : string

Gets the security key param

access

public

since 2.0

Response

string

security key of app

Function getUserData

getUserData() : array

Gets the user specific data param

access

public

since 2.0

Response

array

user specific data

Function setAccessKey

setAccessKey(string $aKey) : void

Sets the accesskey param

access

public

since 2.0

Arguments

$aKey

string

access key of app

Function setAppId

setAppId(string $appId) : void

Sets the application ID param

access

public

since 2.0

Arguments

$appId

string

application ID from UAACS

Function setLandingPage

setLandingPage(string $url) : void

Sets the landing page param

access

public

since 2.0

Arguments

$url

string

URL of landing page

Function setLgnCheckUrl

setLgnCheckUrl(string $lgnCheckUrl) : void

Sets the login check script URL param

access

public

since 2.0

Arguments

$lgnCheckUrl

string

url of login checking script in UAACS

Function setLoginUrl

setLoginUrl(string $loginUrl) : void

Sets the login script URL param

access

public

since 2.0

Arguments

$loginUrl

string

url of login script in UAACS

Function setLogoutUrl

setLogoutUrl(string $logoutUrl) : void

Sets the logout script URL param

access

public

since 2.0

Arguments

$logoutUrl

string

url of logout script in UAACS

Function setRoleId

setRoleId(string $roleId) : void

Sets the role ID param

access

public

since 2.0

Arguments

$roleId

string

role ID from UAACS

Function setSecurityKey

setSecurityKey(string $sKey) : void

Sets the security key param

access

public

since 2.0

Arguments

$sKey

string

security key of app

Properties

Property Landing Page URL

landPageUrl : 
access

private protected

since

Type(s)

Property Landing Page

landPage : 
access

private protected

since

Type(s)

Property Access Key

aKey : 
access

private protected

since

Type(s)

Property Security Key

sKey : 
access

private protected

since

Type(s)

Property Application ID

appId : 
access

private protected

since

Type(s)

Property Role ID

roleId : 
access

private protected

since

Type(s)

Property logout page URL

logoutUrl : 
access

private protected

since

Type(s)

Property Login Page URL

loginUrl : 
access

private protected

since

Type(s)

Property Login check Page URL

lgnCheckUrl : 
access

private protected

since

Type(s)

Property Allowed roles list

allowedRoles : 
access

private protected

since

Type(s)

Property Allowed function list

allowedFunctions : 
access

private protected

since

Type(s)

Property Active role

activeRole : 
access

private protected

since

Type(s)

Property User data structure

userData : 
access

private protected

since

Type(s)