Skip to content

Commit

Permalink
Upgraded turtle.io to 2.3.0, & refactored Basic Auth to use passport
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Aug 8, 2014
1 parent 05a6b00 commit 97f4ad5
Show file tree
Hide file tree
Showing 12 changed files with 430 additions and 347 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 0.3.6
- Upgraded turtle.io to 2.3.0
- Refactored `Basic Auth` to use `passport`

## 0.3.5
- Fixed tests

Expand Down
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,26 +95,22 @@ This is a sample configuration for Tensō, without authentication or SSL. This w
```

## Authentication
Planned authentication options include `OAuth2 (generic)`, `Twitter`, & `Facebook`.
The `protect` Array is the endpoints that will require authentication. Planned authentication options include `OAuth2 (generic)`, `Twitter`, `Facebook`, & `LinkedIn`.

### Basic Auth
`Basic Auth` will be applied to the entire API if enabled.

```javascript
{
"auth": {
"basic": {
"enabled": true,
"list": ["username:password", ...],
"realm": "Private" // `realm` is optional
}
},
"protect": ["/"]
}
}
```

### Oauth2 Bearer Token
The `protect` Array is the endpoints that will be protected by `OAuth2 Bearer Tokens`.

```javascript
{
"auth": {
Expand All @@ -128,9 +124,7 @@ The `protect` Array is the endpoints that will be protected by `OAuth2 Bearer To
```

### Local
The `protect` Array is the endpoints that will be protected by `local` authentication. Do not protect `/`, as it'll block the authentication end points.

`local` authentication will rely on sessions, so SSL is required for production servers.
Do not protect `/`, as it'll block the authentication end points. `local` authentication will rely on sessions, so SSL is required for production servers.

```javascript
{
Expand Down Expand Up @@ -166,7 +160,7 @@ The `protect` Array is the endpoints that will be protected by `local` authentic
},
"login": "/login"
}
"protect": ["/stuff"]
"protect": ["/private"]
}
}
```
Expand Down
18 changes: 9 additions & 9 deletions doc/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-145">line 145</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-146">line 146</a>
</li></ul></dd>


Expand Down Expand Up @@ -437,7 +437,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-285">line 285</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-313">line 313</a>
</li></ul></dd>


Expand Down Expand Up @@ -529,7 +529,7 @@ <h4 class="name" id="error"><span class="type-signature"></span>error<span class

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-343">line 343</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-371">line 371</a>
</li></ul></dd>


Expand Down Expand Up @@ -670,7 +670,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-353">line 353</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-381">line 381</a>
</li></ul></dd>


Expand Down Expand Up @@ -884,7 +884,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-382">line 382</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-410">line 410</a>
</li></ul></dd>


Expand Down Expand Up @@ -1071,7 +1071,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-461">line 461</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-489">line 489</a>
</li></ul></dd>


Expand Down Expand Up @@ -1281,7 +1281,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-482">line 482</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-510">line 510</a>
</li></ul></dd>


Expand Down Expand Up @@ -1445,7 +1445,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-510">line 510</a>
<a href="tenso.js.html">tenso.js</a>, <a href="tenso.js.html#sunlight-1-line-538">line 538</a>
</li></ul></dd>


Expand Down Expand Up @@ -1519,7 +1519,7 @@ <h5>Returns:</h5>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on Thu Aug 07 2014 19:46:50 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Aug 08 2014 18:22:44 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ <h2>License</h2>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on Thu Aug 07 2014 19:46:50 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Aug 08 2014 18:22:44 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
4 changes: 2 additions & 2 deletions doc/module-tenso.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2>


<dt class="tag-version">Version:</dt>
<dd class="tag-version"><ul class="dummy"><li>0.3.5</li></ul></dd>
<dd class="tag-version"><ul class="dummy"><li>0.3.6</li></ul></dd>



Expand Down Expand Up @@ -202,7 +202,7 @@ <h2>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on Thu Aug 07 2014 19:46:50 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Aug 08 2014 18:22:44 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
2 changes: 1 addition & 1 deletion doc/modules.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ <h2>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on Thu Aug 07 2014 19:46:50 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
on Fri Aug 08 2014 18:22:44 GMT-0400 (EDT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
Expand Down
Loading

0 comments on commit 97f4ad5

Please sign in to comment.