omniauth-appnet 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +20 -9
- data/lib/omniauth-appnet/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# OmniAuth::Appnet
|
2
2
|
|
3
|
-
|
3
|
+
An OmniAuth Strategy for App.net.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,12 +18,23 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
### Sinatra
|
22
22
|
|
23
|
-
|
23
|
+
```ruby
|
24
|
+
require 'omniauth'
|
25
|
+
require 'omniauth-appnet'
|
24
26
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
use Rack::Session::Cookie
|
28
|
+
use OmniAuth::Builder do
|
29
|
+
provider :appnet, 'YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET'
|
30
|
+
end
|
31
|
+
|
32
|
+
get '/auth/:provider/callback' do
|
33
|
+
# Do something with auth_hash
|
34
|
+
redirect to('/')
|
35
|
+
end
|
36
|
+
|
37
|
+
def auth_hash
|
38
|
+
request.env['omniauth.auth']
|
39
|
+
end
|
40
|
+
```
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-appnet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|