Class: WorkAuthClient::PasswordRequest
- Inherits:
-
Object
- Object
- WorkAuthClient::PasswordRequest
- Defined in:
- lib/work_auth_client.rb
Instance Attribute Summary collapse
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#client_secret ⇒ Object
Returns the value of attribute client_secret.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(client_id:, client_secret:, username:, password:) ⇒ PasswordRequest
constructor
A new instance of PasswordRequest.
Constructor Details
#initialize(client_id:, client_secret:, username:, password:) ⇒ PasswordRequest
Returns a new instance of PasswordRequest.
80 81 82 83 84 85 |
# File 'lib/work_auth_client.rb', line 80 def initialize(client_id:, client_secret:, username:, password:) self.client_id = client_id self.client_secret = client_secret self.username = username self.password = password end |
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
78 79 80 |
# File 'lib/work_auth_client.rb', line 78 def client_id @client_id end |
#client_secret ⇒ Object
Returns the value of attribute client_secret.
78 79 80 |
# File 'lib/work_auth_client.rb', line 78 def client_secret @client_secret end |
#password ⇒ Object
Returns the value of attribute password.
78 79 80 |
# File 'lib/work_auth_client.rb', line 78 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
78 79 80 |
# File 'lib/work_auth_client.rb', line 78 def username @username end |
Instance Method Details
#as_json ⇒ Object
87 88 89 90 91 92 93 94 95 |
# File 'lib/work_auth_client.rb', line 87 def as_json { client_id: client_id, client_secret: client_secret, username: username, password: password, grant_type: 'password', } end |