sso 0.1.0.alpha2 → 0.1.0.alpha3
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.
- checksums.yaml +4 -4
- data/lib/sso/client/warden/hooks/after_fetch.rb +1 -0
- data/lib/sso/client.rb +1 -0
- data/lib/sso/server.rb +1 -0
- data/spec/dummy/config/initializers/warden.rb +10 -0
- 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: c4a6a80459c2744400e199338c38ffbf615e1eb3
|
4
|
+
data.tar.gz: 704b504eeb29a8533990c91ad3dc94690449fba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ecb0b90995bfb8752ae003e76686d25686f70814529ce3aa9ddbf81e6c68e3b421173626a6cff9dddd208b40b22a9bd63fc4714361bea749effab9dc9c7ea2
|
7
|
+
data.tar.gz: 291961838cee93dbb188b90b2286decacb9290b39bd10a4bf85db80e2c615dfc4f1b98583e8a6a6b8b9c96091c191d7f1176627ebedca21e47929b284b391956
|
data/lib/sso/client.rb
CHANGED
data/lib/sso/server.rb
CHANGED
@@ -7,6 +7,16 @@
|
|
7
7
|
def authenticate!
|
8
8
|
Rails.logger.debug(progname) { 'Authenticating from username and password...' }
|
9
9
|
|
10
|
+
# Note that at this point you might want to log the end-user IP for the attempted login.
|
11
|
+
# That's up to you to solve, but remember one thing:
|
12
|
+
# If you both have an untrusted OAuth client (iPhone) and a trusted one (Alpha Rails app)
|
13
|
+
# and the login at Alpha is performed using the "Resource Owner Password Credentials Grant"
|
14
|
+
# Then you will get Alphas IP, but not the end-users IP. So you might have to pass on the
|
15
|
+
# end user IP from Alpha via params. But you cannot trust params, since the iPhone Client
|
16
|
+
# is not trusted. Thus, in this particular scenario, you cannot blindly trust params['ip']
|
17
|
+
# but you'd have to work with the "insider" and "outsider" doorkeeper application scope
|
18
|
+
# restrictions much like SSO::Server::Authentications::Passport#ip does.
|
19
|
+
|
10
20
|
user = ::User.authenticate params['username'], params['password']
|
11
21
|
|
12
22
|
if user
|