PHP 클래스 Trianglman\Sqrl\Tests\SqrlRequestHandlerTest

저자: johnj
상속: extends PHPUnit_Framework_TestCase
파일 보기 프로젝트 열기: trianglman/sqrl

보호된 프로퍼티들

프로퍼티 타입 설명
$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