mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-22 13:09:44 +05:30
Added Fuzz tests
This commit is contained in:
parent
7b9899c46b
commit
ffe59f5a5f
14
tests/fuzz/tokeninfo-no-access-token.yml
Normal file
14
tests/fuzz/tokeninfo-no-access-token.yml
Normal file
@ -0,0 +1,14 @@
|
||||
url: 'http://localhost:8000/api.php/tokeninfo'
|
||||
request:
|
||||
method: GET
|
||||
response:
|
||||
statusCode: 400
|
||||
headers:
|
||||
Content-type: application/json
|
||||
body:
|
||||
-
|
||||
key: error
|
||||
value: "invalid_request"
|
||||
-
|
||||
key: message
|
||||
value: "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the \"access token\" parameter."
|
14
tests/fuzz/tokeninfo-no-invalid-token-query-string.yml
Normal file
14
tests/fuzz/tokeninfo-no-invalid-token-query-string.yml
Normal file
@ -0,0 +1,14 @@
|
||||
url: 'http://localhost:8000/api.php/tokeninfo?access_token=foobar'
|
||||
request:
|
||||
method: GET
|
||||
response:
|
||||
statusCode: 400
|
||||
headers:
|
||||
Content-type: application/json
|
||||
body:
|
||||
-
|
||||
key: error
|
||||
value: "invalid_request"
|
||||
-
|
||||
key: message
|
||||
value: "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the \"access token\" parameter."
|
18
tests/fuzz/tokeninfo-no-invalid-token.yml
Normal file
18
tests/fuzz/tokeninfo-no-invalid-token.yml
Normal file
@ -0,0 +1,18 @@
|
||||
url: 'http://localhost:8000/api.php/tokeninfo'
|
||||
request:
|
||||
method: GET
|
||||
headers:
|
||||
-
|
||||
key: Authorization
|
||||
value: Bearer foobar
|
||||
response:
|
||||
statusCode: 401
|
||||
headers:
|
||||
Content-type: application/json
|
||||
body:
|
||||
-
|
||||
key: error
|
||||
value: "access_denied"
|
||||
-
|
||||
key: message
|
||||
value: "The resource owner or authorization server denied the request."
|
24
tests/fuzz/tokeninfo-valid-token.yml
Normal file
24
tests/fuzz/tokeninfo-valid-token.yml
Normal file
@ -0,0 +1,24 @@
|
||||
url: 'http://localhost:8000/api.php/tokeninfo'
|
||||
request:
|
||||
method: GET
|
||||
headers:
|
||||
-
|
||||
key: Authorization
|
||||
value: "Bearer iamgod"
|
||||
response:
|
||||
statusCode: 200
|
||||
headers:
|
||||
Content-type: application/json
|
||||
body:
|
||||
-
|
||||
key: owner_id
|
||||
value: testclient
|
||||
-
|
||||
key: owner_type
|
||||
value: client
|
||||
-
|
||||
key: access_token
|
||||
value: iamgod
|
||||
-
|
||||
key: client_id
|
||||
value: testclient
|
Loading…
Reference in New Issue
Block a user