Path: blob/trunk/rb/lib/selenium/webdriver/common/fedcm/account.rb
1990 views
# frozen_string_literal: true12# Licensed to the Software Freedom Conservancy (SFC) under one3# or more contributor license agreements. See the NOTICE file4# distributed with this work for additional information5# regarding copyright ownership. The SFC licenses this file6# to you under the Apache License, Version 2.0 (the7# "License"); you may not use this file except in compliance8# with the License. You may obtain a copy of the License at9#10# http://www.apache.org/licenses/LICENSE-2.011#12# Unless required by applicable law or agreed to in writing,13# software distributed under the License is distributed on an14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY15# KIND, either express or implied. See the License for the16# specific language governing permissions and limitations17# under the License.1819module Selenium20module WebDriver21module FedCM22# Represents an account displayed in a FedCm account list.23# See: https://w3c-fedid.github.io/FedCM/#dictdef-identityprovideraccount24# https://w3c-fedid.github.io/FedCM/#webdriver-accountlist25class Account26LOGIN_STATE_SIGNIN = 'SignIn'27LOGIN_STATE_SIGNUP = 'SignUp'2829attr_reader :account_id, :email, :name, :given_name, :picture_url,30:idp_config_url, :login_state, :terms_of_service_url, :privacy_policy_url3132# steep:ignore:start33def initialize(**args)34@account_id = args['accountId']35@email = args['email']36@name = args['name']37@given_name = args['givenName']38@picture_url = args['pictureUrl']39@idp_config_url = args['idpConfigUrl']40@login_state = args['loginState']41@terms_of_service_url = args['termsOfServiceUrl']42@privacy_policy_url = args['privacyPolicyUrl']43end44# steep:ignore:end45end # Account46end # FedCM47end # WebDriver48end # Selenium495051