You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: user.rb
    path of file: ./repos/gitlabhq/lib/gitlab/auth/ldap
    
    the code of the file until where you have to start completion: # frozen_string_literal: tr
    
        def valid_sign_in?
          # The order is important here: we need to ensure the
          # associated GitLab user entry is valid and persisted in the
          # database. Otherwise, the LDAP access check will fail since
          # the user doesn't have an associated LDAP identity.
          super && allowed?
        end

        def ldap_config
          Gitlab::Auth::Ldap::Config.new(auth_hash.provider)
        end

        def auth_hash=(auth_hash)
          @auth_hash = Gitlab::Auth::Ldap::AuthHash.new(auth_hash)
        end

        def protocol_name
          'LDAP'
        end
      end