JwtBearerTest
- Full name:
\OAuth2\GrantType\JwtBearerTest
- Parent class:
TestCase
Properties
privateKey
Methods
setUp
testMalformedJWT
testBrokenSignature
testExpiredJWT
testBadExp
testNoAssert
testNotBefore
testBadNotBefore
testNonMatchingAudience
testBadClientID
testBadSubject
testMissingKey
testValidJwt
testValidJwtWithScope
testValidJwtInvalidScope
testValidJti
testInvalidJti
testJtiReplayAttack
getJWT
Generates a JWT
private getJWT(mixed $exp = null, mixed $nbf = null, mixed $sub = null, mixed $iss = 'Test Client ID', mixed $jti = null): string
Parameters:
Parameter | Type | Description |
---|---|---|
$exp |
mixed | The expiration date. If the current time is greater than the exp, the JWT is invalid. |
$nbf |
mixed | The "not before" time. If the current time is less than the nbf, the JWT is invalid. |
$sub |
mixed | The subject we are acting on behalf of. This could be the email address of the user in the system. |
$iss |
mixed | The issuer, usually the client_id. |
$jti |
mixed |
getTestServer
Parameters:
Parameter | Type | Description |
---|---|---|
$audience |
mixed |
Automatically generated on 2025-03-18