Module: Yao::Auth
- Defined in:
- lib/yao/auth.rb
Class Method Summary collapse
- .new(tenant_name: Yao.config.tenant_name, username: Yao.config.username, password: Yao.config.password) ⇒ Object
- .try_new ⇒ Object
Class Method Details
.new(tenant_name: Yao.config.tenant_name, username: Yao.config.username, password: Yao.config.password) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/yao/auth.rb', line 20 def new( tenant_name: Yao.config.tenant_name, username: Yao.config.username, password: Yao.config.password ) auth_info = { auth: { passwordCredentials: { username: username, password: password } } } auth_info[:auth][:tenantName] = tenant_name if tenant_name return Token.issue(Yao.default_client.default, auth_info) end |