PHP Class Psecio\Jwt\JwtTest

Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: psecio/jwt

Public Methods

Method Description
testAddClaim ( ) Testing the addition of a claim via the JWT class
testBase64Decode ( ) Testing the custom base64 decoding
testBase64Encode ( ) Testing the custom base64 encoding
testDecodeJwtDataInvalidSections ( ) Test the decoding of an invalid token
testDecodeJwtDataInvalidSignature ( ) Test the decoding of an invalid token signature
testDecodeJwtDataValid ( ) Test the decoding of a valid JWT token
testEncodeJwtData ( ) Test the encoding of some data into the JWT format
testEncryptDecryptToken ( ) Test the encryption and decryption of the token data
testGetSetClaimsCollection ( ) Testing the getter/setter for the Claims data
testGetSetHeader ( ) Test the getter/setter for the Header instance
testHashEquals ( ) Testing the results of the custom hash_equals function
testMagicGetClaimValue ( ) Test getting the claim value with the magic method
testSetClaimInvalidType ( ) Test the setting of a claim with an invalid type
testSignWithPrivateKeyBadHashType ( ) Test the signing with private key data (verify decode)
testSignWithPrivateKeyInvalidKey ( ) Test the signing with private key data (verify decode)
testSignWithPrivateKeySignFailure ( ) Test the signing with private key data (verify decode)
testSignWithPrivateKeyValid ( ) Test the signing with private key data (verify decode)
testVerifyJwtSignatureNoAlg ( ) Try the verify call on a JWT with no algorithm in the header
testVerifyJwtSignatureNoAudience ( ) Try the verify call on a JWT with no audience defined (defined but empty) in the header
testVerifyJwtSignatureNotProcessBefore ( ) Try the verify call on a JWT with no expiration defined in the header
testVerifyJwtSignaturePastExpire ( ) Try the verify call on a JWT with no expiration defined in the header
testVerifyJwtSignatureValid ( ) Test the valid verification of a signature with verify() method

Method Details

testAddClaim() public method

Testing the addition of a claim via the JWT class
public testAddClaim ( )

testBase64Decode() public method

Testing the custom base64 decoding
public testBase64Decode ( )

testBase64Encode() public method

Testing the custom base64 encoding
public testBase64Encode ( )

testDecodeJwtDataInvalidSections() public method

Test the decoding of an invalid token

testDecodeJwtDataInvalidSignature() public method

Test the decoding of an invalid token signature

testDecodeJwtDataValid() public method

Test the decoding of a valid JWT token

testEncodeJwtData() public method

Test the encoding of some data into the JWT format
public testEncodeJwtData ( )

testEncryptDecryptToken() public method

Test the encryption and decryption of the token data

testGetSetClaimsCollection() public method

Testing the getter/setter for the Claims data

testGetSetHeader() public method

Test the getter/setter for the Header instance
public testGetSetHeader ( )

testHashEquals() public method

Testing the results of the custom hash_equals function
public testHashEquals ( )

testMagicGetClaimValue() public method

Test getting the claim value with the magic method

testSetClaimInvalidType() public method

Test the setting of a claim with an invalid type

testSignWithPrivateKeyBadHashType() public method

Test the signing with private key data (verify decode)

testSignWithPrivateKeyInvalidKey() public method

Test the signing with private key data (verify decode)

testSignWithPrivateKeySignFailure() public method

Test the signing with private key data (verify decode)

testSignWithPrivateKeyValid() public method

Test the signing with private key data (verify decode)

testVerifyJwtSignatureNoAlg() public method

Try the verify call on a JWT with no algorithm in the header

testVerifyJwtSignatureNoAudience() public method

Try the verify call on a JWT with no audience defined (defined but empty) in the header

testVerifyJwtSignatureNotProcessBefore() public method

Try the verify call on a JWT with no expiration defined in the header

testVerifyJwtSignaturePastExpire() public method

Try the verify call on a JWT with no expiration defined in the header

testVerifyJwtSignatureValid() public method

Test the valid verification of a signature with verify() method