songkick/oauth2-provider

View on GitHub
example/views/home.erb

Summary

Maintainability
Test Coverage
<p>Welcome to the <b>Songkick OAuth 2.0 demo</b>. The endpoint you should direct
  users to is:</p>

<pre>    <%= host %>/oauth/authorize</pre>

<p>This handles both user authorization and token exchange requests. Before you
can use this though, you&rsquo;ll need to register your application.</p>

<ul>
  <li><a href="/oauth/apps/new">Register your application</a></li>
</ul>

<p>This application is a note-taking app. It exposes a JSON API for reading a
  user&rsquo;s notes, but you need an access token for this. Use the OAuth
  protocol to get one, or see if you can hack in without permission!</p>

<p>The following resources are available. You&rsquo;ll need to ask the user for
  the <b><code>read_notes</code></b> permission scope to get at them.</p>

<ul>
  <li><code>/me</code> &mdash; returns the current user&rsquo;s data</li>
  <li><code>/users/:username/notes</code></li>
  <li><code>/users/:username/notes/:note_id</code></li>
</ul>