lib/yao/auth.rb in yao-0.13.4 vs lib/yao/auth.rb in yao-0.14.0

- old
+ new

@@ -10,16 +10,26 @@ Yao.config.param name, nil end module Auth class << self + # @return [Yao::Auth] def try_new if Yao.config.tenant_name && Yao.config.username && Yao.config.password && Yao.default_client Yao::Auth.new end end + # @param tenant_name [String] + # @param username [String] + # @param password [String] + # @param default_domain [String] + # @param user_domain_id [String] + # @param user_domain_name [String] + # @param project_domain_id [String] + # @param project_domain_name [String] + # @return [Hash] def build_authv3_info(tenant_name, username, password, default_domain, user_domain_id, user_domain_name, project_domain_id, project_domain_name) identity = { @@ -53,10 +63,14 @@ scope: scope } } end + # @param tenant_name [String] + # @param username [String] + # @param password [String] + # @return [Hash] def build_auth_info(tenant_name, username, password) auth_info = { auth: { passwordCredentials: { username: username, password: password @@ -66,9 +80,13 @@ auth_info[:auth][:tenantName] = tenant_name if tenant_name auth_info end + # if identity_api_version == "3" + # @return [TokenV3] + # else + # @return [Token] def new( tenant_name: Yao.config.tenant_name, username: Yao.config.username, password: Yao.config.password, identity_api_version: Yao.config.identity_api_version,