Jan-Willem van der Meer
18f88a1b76
Add new Gitlab::Oauth::AuthHash class
2014-09-04 13:00:27 +02:00
Jan-Willem van der Meer
5b86dab03b
Move auth hash to a seperate class
2014-09-04 12:55:10 +02:00
Jan-Willem van der Meer
1bd15fa717
Use instance methods of LDAP::User as well
...
Still in need of some proper cleanup
2014-09-03 17:33:03 +02:00
Jan-Willem van der Meer
62fc80642d
Refactor Oauth::User class to use instance methods
2014-09-03 15:59:50 +02:00
Jan-Willem van der Meer
26b14dd2d5
Get uid from auth instead of info hash
...
As found in the omniauth specs: https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema
2014-09-01 16:31:27 +02:00
Jan-Willem van der Meer
262276c5f5
Ensure oath callbacks without a nickname work (google)
2014-09-01 14:26:10 +02:00
Jan-Willem van der Meer
5801d520a7
Handle user creation if email is not provided
...
This fixes #1541
2014-09-01 14:05:01 +02:00
Jan-Willem van der Meer
0c34fa3ea0
Add tests for finding an oauth authenticated user
2014-09-01 12:59:04 +02:00
Dmitriy Zaporozhets
931f27ae32
Merge pull request #7141 from PuzzleFlow/uid_should_always_be_string
...
Ensure that uid in OAuth is a string
2014-07-23 20:26:16 +03:00
Dmitriy Zaporozhets
8fee5a0572
Make app works with strong params
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 23:24:17 +03:00
Marin Jankovski
f40e87a03b
Return better error when account exists when attempting oauth account create.
2014-06-24 15:30:29 +03:00
Paweł Świątkowski
61a403ff22
ensure that uid is a string
2014-06-21 11:00:54 +02:00
Marin Jankovski
314e4736e4
Strip apostrophe from email generated usernames.
2014-06-11 17:06:28 +02:00
Julien Pivotto
566badbaee
Use uid as username when creating user with LDAP
...
Without that commit, each user created by a LDAP login would have the
first part of their email address as nickname.
This is not useful for LDAP, where a uid attribute is already set.
2014-05-12 07:30:35 +02:00
C. Morgan Hamill
0456101117
Clean up conditional statement in `name` method.
...
Reverse the conditional order to avoid awkward `if !` construction.
2014-05-08 09:23:17 -04:00
C. Morgan Hamill
a45f7262f9
Clean up of `name` fallback code.
...
Don't use `unless` for the conditional.
Avoid double-quotes where possible.
2014-05-07 16:41:35 -04:00
C. Morgan Hamill
9e805b7754
Provide fallback for missing `name` value.
...
If `auth.info.name` is `nil`, then use `auth.info.first_name + auth.info.last_name`
as the value of `name`.
2014-05-07 16:33:54 -04:00
Dmitriy Zaporozhets
e6f58cb87d
Avoid false validation when create user
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-07 16:47:37 +03:00
Dmitriy Zaporozhets
5436d6afd6
Make oauth works for google oauth too
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-07 16:36:33 +03:00
Dmitriy Zaporozhets
a73df4f72d
Allow oauth signup without email
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-07 14:09:29 +03:00
Maxime Brugidou
2c4e3e001f
Skip email confirmation with LDAP
2013-12-09 11:06:12 +01:00
Dmitriy Zaporozhets
2e8b0fa5cf
Oauth users and users created by admin should be confirmed immediatly
2013-10-15 09:59:58 +03:00
Izaak Alpert
88d4559e62
Removed private scope
...
Change-Id: Ia723321a5cb05deb626d34c7d8d78194e049b1f0
2013-09-11 14:32:24 -04:00
Dmitriy Zaporozhets
b45e92646e
Added Gitlab::OAuth::User class
...
Authenticate or create users from OAuth providers
2013-09-04 00:04:27 +03:00