Class for OpenSSO integration

package libopensso-php

 Methods

Constructs a new OpenSSO client handler

__construct(string $env, boolean $fetch_cookie_name, string $metadata_dir) 

Parameters

$env

string

Which environment from metadata should this helper use

$fetch_cookie_name

boolean

When true cookie name will be fetched from server using getCookieNameForToken

$metadata_dir

string

Directory to load metadata from

Exceptions

\Exception On error

Returns all attributes

all_attributes(boolean $force_arrays) 

Parameters

$force_arrays

boolean

Force use of arrays even on single valued attributes

Returns an attribute value/values

attribute(string $atr, boolean $force_array) 

Parameters

$atr

string

Attribute name

$force_array

boolean

Whether to cast to array even if attribute has a single value

Forces OpenSSO login

check_and_force_sso(string $gotourl) : boolean

Parameters

$gotourl

string

Return URL. If not specified, current URL is used

Returns

booleanUser has a valid SSO session or not

Checks if current user has a valid SSO session

check_sso() : boolean

Returns

booleanUser has a valid SSO session or not

Logs out user from OpenSSO

logout(string $gotourl) 

Parameters

$gotourl

string

URL to return to after logging out

 Properties

 

Chosen environment

$env 

   

Metadata path

$path 

 

Attributes for current user

$attributes 

 

Context needed for stream functions

$context 

 

Current cookie name

$cookiename 

 

Current user SSO token

$token 

 Constants

 

Default cookie name

cookiename 

 

Library version, used inside User-Agent

version