Commit 76b99429 authored by James Edwards-Jones's avatar James Edwards-Jones

GroupLookup uses TokenAuthenticatable comparison

parent a6bed5dc
......@@ -23,19 +23,13 @@ module Gitlab
end
def token_discoverable?
return unless group_discovery_token.present?
group_discovery_token == params['token']
group&.saml_discovery_token_matches?(params['token'])
end
private
attr_reader :env
def group_discovery_token
group&.saml_discovery_token
end
def path_from_callback_path
path = env['PATH_INFO']
path_regex = Gitlab::PathRegex.saml_callback_regex
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment