<commit_before>require 'omniauth-oauth2'

module OmniAuth
  module Strategies
    class Phabricator < OmniAuth::Strategies::OAuth2
      option :client_options, {
        :token_url => "/oauthserver/token/"
      }

      def request_phase
        options[:scope] ||= 'whoami'
        options[:response_type] ||= 'code'
        super
      end

      uid{ raw_info['phid'] }

      info do
        {
          :name => raw_info['realName'],
          :email => raw_info['primaryEmail']
        }
      end

      extra do<commit_msg>raw_info nested result<commit_after>require 'omniauth-oauth2'

module OmniAuth
  module Strategies
    class Phabricator < OmniAuth::Strategies::OAuth2
      option :client_options, {
        :token_url => "/oauthserver/token/"
      }

      def request_phase
        options[:scope] ||= 'whoami'
        options[:response_type] ||= 'code'
        super
      end

      uid{ raw_info['result']['phid'] }

      info do
        {
          :name => raw_info['result']['realName'],
          :email => raw_info['result']['primaryEmail']
        }
      end

      extra do
{'fraction_non_alphanumeric': 0.12307692307692308, 'fraction_numerical': 0.0036199095022624436, 'mean_word_length': 2.169054441260745, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7644636', 'n_tokens_mistral': 347, 'n_tokens_neox': 336, 'n_words': 65}