omniauth-drchrono 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/omniauth/strategies/drchrono.rb +18 -0
- data/lib/omniauth-drchrono/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4adc92e593b22a0c7ca9d07bed328bf0cb048d84
|
4
|
+
data.tar.gz: 2629781b08be9043d59e1d31dc1b0016182a2494
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d93a786a3cc5f2f21f83ab0a4c7465cf15b2185802d75e150f9110b9b70a36288722d39fbcf1d6dce7512f7da77103a508e81575983deff2e14bf4f73fbc9e27
|
7
|
+
data.tar.gz: 1567c5104d549615b6b5bfb3c0e7f6c8ee482ce33353d343abe61263cd8b5da497594bf108a82f5a59512b28363fd92116b50be10aebe7c31ccda171e985f522
|
data/README.md
CHANGED
@@ -28,7 +28,7 @@ end
|
|
28
28
|
|
29
29
|
## Contributing
|
30
30
|
|
31
|
-
1. Fork it ( https://github.com/
|
31
|
+
1. Fork it ( https://github.com/johnnadeau/omniauth-drchrono/fork )
|
32
32
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
33
33
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
34
34
|
4. Push to the branch (`git push origin my-new-feature`)
|
@@ -11,6 +11,24 @@ module OmniAuth
|
|
11
11
|
:authorize_url => 'https://drchrono.com/o/authorize',
|
12
12
|
:token_url => 'https://drchrono.com/o/token'
|
13
13
|
}
|
14
|
+
|
15
|
+
uid { raw_info['username'] }
|
16
|
+
|
17
|
+
info do
|
18
|
+
{ :doctor => doctor }
|
19
|
+
end
|
20
|
+
|
21
|
+
extra do
|
22
|
+
{ :raw_info => raw_info }
|
23
|
+
end
|
24
|
+
|
25
|
+
def raw_info
|
26
|
+
@raw_info ||= access_token.get('users/current').parsed
|
27
|
+
end
|
28
|
+
|
29
|
+
def doctor
|
30
|
+
@doctor ||= access_token.get(raw_info['doctor']).parsed
|
31
|
+
end
|
14
32
|
end
|
15
33
|
end
|
16
34
|
end
|