PHP Класс Trianglman\Sqrl\Tests\SqrlRequestHandlerTest

Автор: johnj
Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$config mock Mocked version of \Trianglman\Sqrl\SqrlConfiguration
$generator mock Mocked version of \Trianglman\Sqrl\SqrlGenerate
$handler Trianglman\Sqrl\SqrlRequestHandler The object being tested
$storage mock Mocked version of \Trianglman\Sqrl\SqrlStoreInterface
$validator mock Mocked version of \Trianglman\Sqrl\SqrlValidate

Открытые методы

Метод Описание
setup ( )
testHandlesIncompleteRequest ( ) Tests that the server responds with a client failure flag if the client fails to send all the information needed to make a basic request.
testHandlesRequestWhereServerValueDoesntValidate ( ) Tests that the server responds with a client failure flag if the client sends a server value that doesn't match what the server sent
testHandlesRequestWithInvalidClient ( ) Tests that the server responds with a client failure flag if the client fails to send all the information needed to make a basic request.
testHandlesRequestWithInvalidIDS ( ) Tests that the server responds with a client failure flag if the client sends an invalid IDS signature
testHandlesRequestWithInvalidPIDS ( ) Tests that the server responds with a client failure flag if the client sends an invalid pIDS signature
testHandlesRequestWithInvalidURS ( ) Tests that the server responds with a client failure flag if the client sends an invalid URS signature
testHandlesRequestWithInvalidURSDuringIDUpdate ( ) Tests that the server responds with a client failure flag if the client sends an invalid URS signature
testRespondsToIdent ( ) tests the server responding to a cmd=ident with a known idk
testRespondsToIdentDuringIdentityUpdate ( ) tests the server responding to a cmd=setkey when the user is supplying a pidk in order to update their account.
testRespondsToIdentDuringIdentityUpdateMissingNewSUK ( )
testRespondsToIdentIncompleteAccountInformation ( ) Test that the server returns a failure when the user attempts to create an account without all required information (suk and vuk)
testRespondsToIdentNoUnknownAccountAllowed ( ) Test the server will respond with a function not supported error if the user attempts to create an account when it is not allowed.
testRespondsToIdentWhenCreatingAccount ( ) tests the server responding to a cmd=ident with an unknown idk
testRespondsToLock ( ) tests the server responding to a cmd=lock
testRespondsToLockUnknownAccount ( ) tests the server responding to a cmd=lock when the account doesn't exist
testRespondsToQueryBadNutHardFailure ( ) tests the server responding to a cmd=query when the nut has expired, is unknown, or in some other way is invalid, causing a hard failure
testRespondsToQueryDuringIdentityUpdate ( ) tests the server responding to a cmd=query when the user is supplying a pidk in order to update their account.
testRespondsToQueryExpiredNutSoftFailure ( ) tests the server responding to a cmd=query when the nut has expired
testRespondsToQueryKnownIdentityKey ( ) tests the server responding to a cmd=query when the idk is known
testRespondsToQueryKnownIdentityKeyIPMismatch ( ) tests the server responding to a cmd=query when the idk is known and the IPs do not match
testRespondsToQueryNutKeyMismatch ( ) tests the server responding to a cmd=query when the nut has expired, is unknown, or in some other way is invalid, causing a hard failure
testRespondsToQueryUnknownIdentityKeyAuthenticationProceeds ( ) tests the server responding to a cmd=query with the idk is not known
testRespondsToQueryUnknownIdentityKeyHardFailure ( ) tests the server responding to a cmd=query with the idk is not known
testRespondsToQueryWhenAccountLocked ( ) tests the server responding to a cmd=query when the account has previously been locked
testRespondsToUnlockRequest ( ) tests the server responding to a cmd=ident when the account has previously been locked when the user is supplying the Identity Lock credentials
testRespondsToUnlockRequestMismathedVUK ( )

Защищенные методы

Метод Описание
base64UrlEncode ( $string )

Описание методов

base64UrlEncode() защищенный Метод

protected base64UrlEncode ( $string )

setup() публичный Метод

public setup ( )

testHandlesIncompleteRequest() публичный Метод

Tests that the server responds with a client failure flag if the client fails to send all the information needed to make a basic request.

testHandlesRequestWhereServerValueDoesntValidate() публичный Метод

Tests that the server responds with a client failure flag if the client sends a server value that doesn't match what the server sent

testHandlesRequestWithInvalidClient() публичный Метод

Tests that the server responds with a client failure flag if the client fails to send all the information needed to make a basic request.

testHandlesRequestWithInvalidIDS() публичный Метод

Tests that the server responds with a client failure flag if the client sends an invalid IDS signature

testHandlesRequestWithInvalidPIDS() публичный Метод

Tests that the server responds with a client failure flag if the client sends an invalid pIDS signature

testHandlesRequestWithInvalidURS() публичный Метод

Tests that the server responds with a client failure flag if the client sends an invalid URS signature

testHandlesRequestWithInvalidURSDuringIDUpdate() публичный Метод

Tests that the server responds with a client failure flag if the client sends an invalid URS signature

testRespondsToIdent() публичный Метод

this should connect the session with the identity key, authorizing the transaction (log-in, purchase authentication, etc.)
public testRespondsToIdent ( )

testRespondsToIdentDuringIdentityUpdate() публичный Метод

This should cause the server to replace the previous idk with the newly supplied idk

testRespondsToIdentDuringIdentityUpdateMissingNewSUK() публичный Метод

testRespondsToIdentIncompleteAccountInformation() публичный Метод

Test that the server returns a failure when the user attempts to create an account without all required information (suk and vuk)

testRespondsToIdentNoUnknownAccountAllowed() публичный Метод

Test the server will respond with a function not supported error if the user attempts to create an account when it is not allowed.

testRespondsToIdentWhenCreatingAccount() публичный Метод

this should connect the session with the identity key, authorizing the transaction (generally a log in or account creation/association) and that the suk and vuk have been stored

testRespondsToLock() публичный Метод

this will lock the user's identity key against further authentication
public testRespondsToLock ( )

testRespondsToLockUnknownAccount() публичный Метод

tests the server responding to a cmd=lock when the account doesn't exist

testRespondsToQueryBadNutHardFailure() публичный Метод

this will end the authentication transaction

testRespondsToQueryDuringIdentityUpdate() публичный Метод

This should return the user's suk value in order to do the full identity unlock process and update the records

testRespondsToQueryExpiredNutSoftFailure() публичный Метод

this should cause the client to sign the response with a new query in order to continue authentication

testRespondsToQueryKnownIdentityKey() публичный Метод

this will generally be the first step of most authentication, so the server value will be the (s)qrl:// URL

testRespondsToQueryKnownIdentityKeyIPMismatch() публичный Метод

this will be both a MITM check and a common case when using a separate device to authenticate so no temporary or permantent failure should be returned

testRespondsToQueryNutKeyMismatch() публичный Метод

this will end the authentication transaction

testRespondsToQueryUnknownIdentityKeyAuthenticationProceeds() публичный Метод

this is in the instance where the server will allow the authentication to proceed generally this will be on a create account or associate account with SQRL page

testRespondsToQueryUnknownIdentityKeyHardFailure() публичный Метод

this is in the instance where the server does not allow previously unknown identities to authenticate to the server

testRespondsToQueryWhenAccountLocked() публичный Метод

this should return the suk value previously supplied by the user in order for the client to complete the identity unlock process

testRespondsToUnlockRequest() публичный Метод

this will validate both the identity and the vuk/urs process was completed then unlock the idk for future authentication

testRespondsToUnlockRequestMismathedVUK() публичный Метод

Описание свойств

$config защищенное свойство

Mocked version of \Trianglman\Sqrl\SqrlConfiguration
protected mock $config
Результат mock

$generator защищенное свойство

Mocked version of \Trianglman\Sqrl\SqrlGenerate
protected mock $generator
Результат mock

$handler защищенное свойство

The object being tested
protected SqrlRequestHandler,Trianglman\SQRL $handler
Результат Trianglman\Sqrl\SqrlRequestHandler

$storage защищенное свойство

Mocked version of \Trianglman\Sqrl\SqrlStoreInterface
protected mock $storage
Результат mock

$validator защищенное свойство

Mocked version of \Trianglman\Sqrl\SqrlValidate
protected mock $validator
Результат mock