Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix test] "Expiration (exp) time must be a unix time stamp" on 32-bit platform #899

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/OAuth2/GrantType/JwtBearerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function testInvalidJti()
$server = $this->getTestServer();
$request = TestRequest::createPost(array(
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer', // valid grant type
'assertion' => $this->getJWT(99999999900, null, '[email protected]', 'Test Client ID', 'used_jti'), // valid assertion with invalid scope
'assertion' => $this->getJWT(2147483647, null, '[email protected]', 'Test Client ID', 'used_jti'), // valid assertion with invalid scope
));
$token = $server->grantAccessToken($request, $response = new Response());

Expand All @@ -296,7 +296,7 @@ public function testJtiReplayAttack()
$server = $this->getTestServer();
$request = TestRequest::createPost(array(
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer', // valid grant type
'assertion' => $this->getJWT(99999999900, null, '[email protected]', 'Test Client ID', 'totally_new_jti'), // valid assertion with invalid scope
'assertion' => $this->getJWT(null, null, '[email protected]', 'Test Client ID', 'totally_new_jti'), // valid assertion with invalid scope
));
$token = $server->grantAccessToken($request, $response = new Response());

Expand Down
20 changes: 10 additions & 10 deletions test/config/storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,40 @@
"client_id": "Test Client ID",
"user_id": "",
"redirect_uri": "",
"expires": "9999999999",
"expires": 2147483647,
"id_token": "IDTOKEN"
},
"testcode-with-scope": {
"client_id": "Test Client ID",
"user_id": "",
"redirect_uri": "",
"expires": "9999999999",
"expires": 2147483647,
"scope": "scope1 scope2"
},
"testcode-expired": {
"client_id": "Test Client ID",
"user_id": "",
"redirect_uri": "",
"expires": "1356998400"
"expires": 1356998400
},
"testcode-empty-secret": {
"client_id": "Test Client ID Empty Secret",
"user_id": "",
"redirect_uri": "",
"expires": "9999999999"
"expires": 2147483647
},
"testcode-openid": {
"client_id": "Test Client ID",
"user_id": "",
"redirect_uri": "",
"expires": "9999999999",
"expires": 2147483647,
"id_token": "test_id_token"
},
"testcode-redirect-uri": {
"client_id": "Test Client ID",
"user_id": "",
"redirect_uri": "http://brentertainment.com/voil%C3%A0",
"expires": "9999999999",
"expires": 2147483647,
"id_token": "IDTOKEN"
}
},
Expand Down Expand Up @@ -122,19 +122,19 @@
"accesstoken-scope": {
"access_token": "accesstoken-scope",
"client_id": "Test Client ID",
"expires": 99999999900,
"expires": 2147483647,
"scope": "testscope"
},
"accesstoken-openid-connect": {
"access_token": "accesstoken-openid-connect",
"client_id": "Test Client ID",
"user_id": "testuser",
"expires": 99999999900,
"expires": 2147483647,
"scope": "openid email"
},
"accesstoken-malformed": {
"access_token": "accesstoken-mallformed",
"expires": 99999999900,
"expires": 2147483647,
"scope": "testscope"
}
},
Expand Down Expand Up @@ -165,7 +165,7 @@
"issuer": "Test Client ID",
"subject": "[email protected]",
"audience": "http://myapp.com/oauth/auth",
"expires": 99999999900,
"expires": 2147483647,
"jti": "used_jti"
}
],
Expand Down