Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
readme cleanup
  • Loading branch information
tanner0101 committed Apr 7, 2017
1 parent da62545 commit c435003
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 50 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Expand Up @@ -7,7 +7,7 @@ let package = Package(
.Package(url:"https://github.com/vapor/jwt.git", Version(2,0,0, prereleaseIdentifiers: ["beta"])),

// Middleware and conveniences for using Auth in Vapor.
.Package(url:"https://github.com/vapor/auth-provider.git", majorVersion: 0),
.Package(url:"https://github.com/vapor/auth-provider.git", Version(1,0,0, prereleaseIdentifiers: ["beta"])),

// A web framework and server for Swift that works on macOS and Ubuntu.
.Package(url: "https://github.com/vapor/vapor.git", Version(2,0,0, prereleaseIdentifiers: ["beta"]))
Expand Down
69 changes: 20 additions & 49 deletions README.md
@@ -1,49 +1,20 @@
# JWT Provider for Vapor

Adds JWT support to the Vapor web framework.

## Add the dependency to Package.swift

```JSON
.Package(url: "https://github.com/vapor/jwt-provider.git", ...)
```

## Add the provider to your Droplet instance

```swift
import Vapor
import VaporJWT

let drop = Droplet()
try drop.addProvider(VaporJWT.Provider.self)
```

## Config

To build, the first place you'll want to look is the Config/ directory. In their, you should create a secrets folder and a nested `jwt.json`.

```
Config/
- jwt.json
secrets/
- jwt.json
```

The secrets folder is under the gitignore and shouldn't be committed.

Here's an example `secrets/jwt.json`

```json
{
"signer": {
"type": "rsa",
"key": "...",
"algorithm": "rs256"
}
}

```

## JWT

For just JWT support, check out [vapor/jwt](https://github.com/vapor/jwt).
<p align="center">
<img src="https://cloud.githubusercontent.com/assets/1342803/24798850/8777297c-1b98-11e7-82ce-fa01f567c564.png" width="320" alt="JWT Provider">
<br>
<br>
<a href="https://github.com/vapor/jwt-provider/blob/0.5.0/README.md">
<img src="http://img.shields.io/badge/read_the-docs-92A8D1.svg" alt="Documentation">
</a>
<a href="http://vapor.team">
<img src="http://vapor.team/badge.svg" alt="Slack Team">
</a>
<a href="LICENSE">
<img src="http://img.shields.io/badge/license-MIT-brightgreen.svg" alt="MIT License">
</a>
<a href="https://circleci.com/gh/vapor/jwt-provider">
<img src="https://circleci.com/gh/vapor/jwt-provider.svg?style=shield" alt="Continuous Integration">
</a>
<a href="https://swift.org">
<img src="http://img.shields.io/badge/swift-3.1-brightgreen.svg" alt="Swift 3.1">
</a>
</center>
11 changes: 11 additions & 0 deletions circle.yml
@@ -0,0 +1,11 @@
dependencies:
override:
- eval "$(curl -sL https://apt.vapor.sh)"
- sudo apt-get install vapor
- sudo chmod -R a+rx /usr/
test:
override:
- swift build
- swift build -c release
- swift test

0 comments on commit c435003

Please sign in to comment.