Skip to content

psecio/secure-api

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
App
 
 
 
 
db
 
 
 
 
 
 
 
 
 
 
 
 

secure-api

Repository for the "Building a Secure API" series on Websec.io

To use this project

  1. Clone the repository:
git clone git@github.com:psecio/secure-api.git
  1. Change over to the public/ directory
  2. Use the built-in PHP web server to handle requests
php -S localhost:8000

Then go to http://localhost:8000 in a browser to view the result.

Test client

The file test-client.php contains an example of the HTTP client making a request to the API key with the flow created in the tutorial series. You'll need to install Guzzle to have it work correctly. Install it via Composer with:

composer require guzzlehttp/guzzle

Then you can run it with: php test-client.php. If all goes well you should get the "validation success" message back from the last call to the API.

The Series

About

Repository for the "Building a Secure API" series on Websec.io

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages