Sha256: 32562bee97ab3bbf30e2a853d4fb23bec173bf2529d4da872901c3ff4a044750

Contents?: true

Size: 591 Bytes

Versions: 93

Compression:

Stored size: 591 Bytes

Contents

class Eco::API::Common::People::DefaultParsers::LoginProvidersParser < Eco::API::Common::Loaders::Parser
  attribute "login_provider_ids"
  parsing_phase     :final
  serializing_phase :final

  def parser(hash, deps)
    hash["login_provider_ids"].map do |name|
      login_providers.to_id(name&.downcase.strip)
    end.compact
  end

  def serializer(hash, deps)
    if ids = hash["login_provider_ids"]
      login_providers.to_name(ids)
    else
      []
    end
  end

  private

  def login_providers
    @login_providers ||= config.login_providers
  end

end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
eco-helpers-2.0.50 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.49 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.48 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.47 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.46 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.45 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.44 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.43 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.42 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.41 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.40 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.39 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.38 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.37 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.36 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.35 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.34 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.33 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.32 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.0.31 lib/eco/api/common/people/default_parsers/login_providers_parser.rb