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.4.4 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.4.3 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.4.2 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.3.3 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.3.2 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.2.5 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.2.4 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.2.3 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.2.2 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.2.1 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.12 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.11 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.10 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.9 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.8 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.7 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.6 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.5 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.4 lib/eco/api/common/people/default_parsers/login_providers_parser.rb
eco-helpers-2.1.3 lib/eco/api/common/people/default_parsers/login_providers_parser.rb