2016-04-04 20:09:12 -04:00
|
|
|
module Gitlab
|
|
|
|
module Saml
|
|
|
|
class AuthHash < Gitlab::OAuth::AuthHash
|
|
|
|
def groups
|
|
|
|
get_raw(Gitlab::Saml::Config.groups)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def get_raw(key)
|
2016-04-06 19:12:25 -04:00
|
|
|
# Needs to call `all` because of https://git.io/vVo4u
|
2016-04-06 17:03:35 -04:00
|
|
|
# otherwise just the first value is returned
|
|
|
|
auth_hash.extra[:raw_info].all[key]
|
2016-04-04 20:09:12 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|