Property | Type | Description | |
---|---|---|---|
$brokerId | mixed | ||
$cache | Desarrolla2\Cache\Cache | Cache that stores the special session data for the brokers. | |
$options | array | ||
$returnType | string |
Method | Description | |
---|---|---|
__construct ( array $options = [] ) | Class constructor | |
attach ( ) | Attach a user session to a broker session | |
login ( ) | Authenticate | |
logout ( ) | Log out | |
startBrokerSession ( ) | Start the session for broker requests to the SSO server | |
userInfo ( ) | Ouput user information as json. |
Method | Description | |
---|---|---|
authenticate ( string $username, string $password ) : Jasny\ValidationResult | Authenticate using user credentials | |
createCacheAdapter ( ) : Desarrolla2\Cache\Cache | Create a cache to store the broker session id. | |
detectReturnType ( ) | Detect the type for the HTTP response. | |
fail ( string $message, integer $http_status = 500 ) | An error occured. | |
generateAttachChecksum ( string $brokerId, string $token ) : string | Generate session id from session token | |
generateSessionId ( string $brokerId, string $token ) : string | Generate session id from session token | |
getBrokerInfo ( string $brokerId ) : array | Get the secret key and other info of a broker | |
getBrokerSessionID ( ) | Get session ID from header Authorization or from $_GET/$_POST | |
getSessionData ( type $key ) | Get session data | |
getUserInfo ( string $username ) : array | object | Get the information about a user | |
outputAttachSuccess ( ) | Output on a successful attach | |
outputImage ( ) | Output a 1x1px transparent image | |
setSessionData ( string $key, string $value ) | Set session data | |
startUserSession ( ) | Start the session when a user visits the SSO server | |
validateBrokerSessionId ( string $sid ) : string | Validate the broker session id |
public __construct ( array $options = [] ) | ||
$options | array |
abstract protected authenticate ( string $username, string $password ) : Jasny\ValidationResult | ||
$username | string | |
$password | string | |
return | Jasny\ValidationResult |
protected createCacheAdapter ( ) : Desarrolla2\Cache\Cache | ||
return | Desarrolla2\Cache\Cache |
protected detectReturnType ( ) |
abstract protected getBrokerInfo ( string $brokerId ) : array | ||
$brokerId | string | |
return | array |
protected getBrokerSessionID ( ) |
protected outputAttachSuccess ( ) |
protected setSessionData ( string $key, string $value ) | ||
$key | string | |
$value | string |
public startBrokerSession ( ) |
protected startUserSession ( ) |
protected validateBrokerSessionId ( string $sid ) : string | ||
$sid | string | session id |
return | string | the broker id |
protected Cache,Desarrolla2\Cache $cache | ||
return | Desarrolla2\Cache\Cache |