~/talk

Protect your API with OAuth2

Talkat code.talks 2017 · 2017-09-28..09-29· [security, php]
slides:none on file

Argues that OAuth2 is the correct way to protect APIs, with a concrete PHP recipe: use Composer, a server library like brentshaffer/oauth2-server, Slim + PDO storage and add grant types for password and authorization code. Demonstrates a working token endpoint, bearer header checks that return 401/200, a sample Slim bookshelf API, and using Guzzle or curl. Mentions JWT tokens for stateless validation, typical access-token lifetimes (≈20–60 minutes) and longer refresh tokens that exchange for new access tokens; implementation details and SQL migrations are provided.

AI-written summary · about

  1. 0:00Start
  2. 0:12Protect Your API with OAuth 2
  3. 10:18Password grant (for 1st party apps)
  4. 18:27Authorisation Code (for 3rd party apps)
  5. 29:56Refresh tokens
  6. 33:08Questions?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.