Need help with oauth2-server-php-docs?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

221 Stars 146 Forks 159 Commits 46 Opened issues


documentation for the oauth2-server-php library

Services available


Need anything else?

Contributors list

OAuth2 Server PHP Documentation

This repository hosts the documentation for the oauth2-server-php library.

All submissions are welcome! To submit a change, fork this repo and send us a pull request.


Ruby 1.9 is required to build the site.

Get the nanoc gem, plus kramdown for markdown parsing:

bundle install

Compile the src into the

directory by running the following command:
nanoc compile

You can see the available commands with nanoc:

nanoc -h

Nanoc has some nice documentation to get you started. Though if you're mainly concerned with editing or adding content, you won't need to know much about nanoc.


Nanoc compiles the site into static files living in

. It's smart enough not to try to compile unchanged files:
$ nanoc compile
Loading site data...
Compiling site...
   identical  [0.00s]  output/css/960.css
   identical  [0.00s]  output/css/pygments.css
   identical  [0.00s]  output/css/reset.css
   identical  [0.00s]  output/css/styles.css
   identical  [0.00s]  output/css/uv_active4d.css
      update  [0.28s]  output/index.html

Site compiled in 5.81s.

You can setup whatever you want to view the files. If you have the adsf gem, however (I hope so, it was in the Gemfile), you can start Webrick:

$ nanoc view
$ open http://localhost:3000

Compilation times got you down? Use

$ nanoc autocompile

This starts a web server too, so there's no need to run

nanoc view
. One thing: remember to add trailing slashes to all nanoc links!


$ rake publish


Not sure how to structure the docs? Here's what the structure of the API docs should look like:

# API title

API endpoint title

[VERB] /path/to/endpoint.json


name : description

Input (request json body)

"sample value" %>


true, 'X-Custom-Header' => "value" %>

Note: We're using Kramdown Markdown extensions, such as definition lists.

JSON Responses

We specify the JSON responses in ruby so that we don't have to write them by hand all over the docs. You can render the JSON for a resource like this:

This looks up


Some actions return arrays. You can modify the JSON by passing a block:

Terminal blocks

You can specify terminal blocks with

elements. It'd be nice if Markdown could do this more cleanly...
$ curl foobar

This isn't a

tutorial though, I'm not sure every API call needs to show how to access it with

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.