Implements methods to manage OpenSSO interactions

package libopensso-php

 Methods

Creates a new OpenSSO user manager

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

Parameters

$env

string

Which environment from metadata should this helper use

$ask_server

boolean

When true cookie name will be fetched from server using getCookieNameForToken

$metadata_dir

string

Directory to load metadata from

Magic __get method

__get(string $name) : mixed

Parameters

$name

string

Attribute name

Returns

mixedAttribute value

Returns all attributes for current user

allAttributes(boolean $use_arrays) : Array

Parameters

$use_arrays

boolean

Whether to return values as arrays

Returns

ArrayAssociative array of attribute => value

Reads attribute value and returns it as an array

attributeAsArray(string $name) : Array

Parameters

$name

string

Attribute name

Returns

ArrayValues for attribute

Enforces OpenSSO authentication by redirecting user to OpenSSO login page if not currently logged in

enforceAuthentication(string $url) : boolean

Parameters

$url

string

optional URL to return after authentication

Returns

booleandetermines if user was authenticated or not

Checks current user authentication state

isAuthenticated() : boolean

Returns

booleanuser has a valid session

Logs out current user

logout(string $url) : boolean

Parameters

$url

string

optional URL to return after authentication

Returns

booleandetermines if user was authenticated or not

 Properties

 

$handler