Skip to content

Methods API

Dirk Tepe edited this page Mar 24, 2024 · 4 revisions

Methods

authenticate

Authenticates the user based on the current request.

@return bool

cas()->authenticate()

getConfig

Returns the current config.

@return array

cas()->getConfig()

user

Retrieve authenticated credentials

@return string

cas()->user()


cas()->getCurrentUser()

getAttribute

Retrieve a specific attribute by key name

@param $key @return mixed

cas()->getAttribute($key)

logout

Initiates a logout

@return void

cas()->logout()

getAttributes

Get the attributes for for the currently connected user. This method can only be called after authenticate() or an error wil be thrown.

@return mixed

cas()->getAttributes()

isAuthenticated

Checks to see is user is authenticated. Overridden when masquerading.

@return bool

cas()->isAuthenticated()

checkAuthentication

Checks to see if the user is authenticated locally or has a global CAS session. Overridden when masquerading.

@return bool

cas()->checkAuthentication()

Dynamic calls

Pass calls directly to phpCAS using cas()->someMethod($your_parameters) for maximum app flexibility. You will need to look through their massive list of documentation for all the methods they use.

@param $method @param $params @return mixed

cas()->otherMethodName($params)