Skip to content

okta-samples/okta-php-api-quickstart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP API Quickstart

This is the completed project corresponding to the guide "Protect your API endpoints".

Getting Started

Install dependencies:

composer install

Copy the file .env.example to .env and fill in your Okta issuer and audience configuration.

Run the app with the built-in PHP server:

php -S 127.0.0.1:8080 -t public

Get an access token by using an OAuth client such as https://example-app.com/client. Make a request with that access token to this API, such as:

curl -H "Authorization: Bearer TOKEN" http://127.0.0.1:8080/api/whoami

About

PHP API quickstart example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published