PHP Interface Trianglman\Sqrl\SqrlStoreInterface

Author: johnj
Mostra file Open project: trianglman/sqrl

Public Methods

Method Description
checkIdentityKey ( string $key ) : integer Checks the status of an identity key
createIdentity ( string $key, string $suk, string $vuk ) : void Stores a new identity key along with the Identity Lock information
endSession ( string $requestNut ) : void Flags a session as no longer valid.
getIdentitySUK ( string $key ) : string Gets an identity's SUK value in order for the client to use the Identity Unlock protocol
getIdentityVUK ( string $key ) : string Gets an identity's VUK value in order for the client to use the Identity Unlock protocol
getNutDetails ( string $nut ) : array: Retrieves information about the supplied nut
getSessionNonce ( ) : string Gets the current active nonce for the user's session if there is any
lockIdentityKey ( string $key ) : void Locks an authentication key against further use until a successful unlock
logSessionIn ( string $requestNut ) : void Activates a session
storeNonce ( string $nonce, integer $action, string $key = '', string $previousNonce = '' ) : void Stores a nonce and the related information
unlockIdentityKey ( string $key ) : void Unlocks an authentication key allowing future authentication
updateIdentityKey ( string $oldKey, string $newKey, string $newSuk, string $newVuk ) : void Updates a user's key information after an identity update action

Method Details

checkIdentityKey() public method

Checks the status of an identity key
public checkIdentityKey ( string $key ) : integer
$key string
return integer One of the class key status constants

createIdentity() public method

Stores a new identity key along with the Identity Lock information
public createIdentity ( string $key, string $suk, string $vuk ) : void
$key string
$suk string
$vuk string
return void

endSession() public method

This should either immediatly destroy the session, or mark the session in such a way that it will be destroyed the next time it is accessed.
public endSession ( string $requestNut ) : void
$requestNut string The nut of the curret request related to the session to be destroyed
return void

getIdentitySUK() public method

Gets an identity's SUK value in order for the client to use the Identity Unlock protocol
public getIdentitySUK ( string $key ) : string
$key string The identity key
return string The SUK value

getIdentityVUK() public method

Gets an identity's VUK value in order for the client to use the Identity Unlock protocol
public getIdentityVUK ( string $key ) : string
$key string The identity key
return string The VUK value

getNutDetails() public method

Retrieves information about the supplied nut
public getNutDetails ( string $nut ) : array:
$nut string The nonce to retrieve information on
return array:

getSessionNonce() public method

Gets the current active nonce for the user's session if there is any
public getSessionNonce ( ) : string
return string

lockIdentityKey() public method

Locks an authentication key against further use until a successful unlock
public lockIdentityKey ( string $key ) : void
$key string The authentication key to lock
return void

logSessionIn() public method

Activates a session
public logSessionIn ( string $requestNut ) : void
$requestNut string The nut of the current request that is being logged in
return void

storeNonce() public method

Stores a nonce and the related information
public storeNonce ( string $nonce, integer $action, string $key = '', string $previousNonce = '' ) : void
$nonce string The nonce to store
$action integer The tif related to the nonce
$key string [Optional] The identity key related to the nonce
$previousNonce string [Optional] The previous nonce related to the nonce
return void

unlockIdentityKey() public method

Unlocks an authentication key allowing future authentication
public unlockIdentityKey ( string $key ) : void
$key string The authentication key to lock
return void

updateIdentityKey() public method

Updates a user's key information after an identity update action
public updateIdentityKey ( string $oldKey, string $newKey, string $newSuk, string $newVuk ) : void
$oldKey string The key getting new information
$newKey string The authentication key replacing the old key
$newSuk string The replacement SUK
$newVuk string The replacement VUK
return void