Class: AuthRocket::Credential
- Inherits:
-
Resource
- Object
- Resource
- AuthRocket::Credential
- Defined in:
- lib/authrocket/credential.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#client_app_name ⇒ Object
readonly
Returns the value of attribute client_app_name.
-
#credential_type ⇒ Object
readonly
Returns the value of attribute credential_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#otp_secret ⇒ Object
readonly
Returns the value of attribute otp_secret.
-
#password ⇒ Object
readonly
writeonly.
-
#provisioning_svg ⇒ Object
readonly
Returns the value of attribute provisioning_svg.
-
#provisioning_uri ⇒ Object
readonly
Returns the value of attribute provisioning_uri.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#verify(code, attribs = {}) ⇒ Object
code - required.
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
12 13 14 |
# File 'lib/authrocket/credential.rb', line 12 def access_token @access_token end |
#client_app_name ⇒ Object (readonly)
Returns the value of attribute client_app_name.
14 15 16 |
# File 'lib/authrocket/credential.rb', line 14 def client_app_name @client_app_name end |
#credential_type ⇒ Object (readonly)
Returns the value of attribute credential_type.
9 10 11 |
# File 'lib/authrocket/credential.rb', line 9 def credential_type @credential_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
11 12 13 |
# File 'lib/authrocket/credential.rb', line 11 def name @name end |
#otp_secret ⇒ Object (readonly)
Returns the value of attribute otp_secret.
11 12 13 |
# File 'lib/authrocket/credential.rb', line 11 def otp_secret @otp_secret end |
#password ⇒ Object (readonly)
writeonly
10 11 12 |
# File 'lib/authrocket/credential.rb', line 10 def password @password end |
#provisioning_svg ⇒ Object (readonly)
Returns the value of attribute provisioning_svg.
11 12 13 |
# File 'lib/authrocket/credential.rb', line 11 def provisioning_svg @provisioning_svg end |
#provisioning_uri ⇒ Object (readonly)
Returns the value of attribute provisioning_uri.
11 12 13 |
# File 'lib/authrocket/credential.rb', line 11 def provisioning_uri @provisioning_uri end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
11 12 13 |
# File 'lib/authrocket/credential.rb', line 11 def state @state end |
Instance Method Details
#verify(code, attribs = {}) ⇒ Object
code - required
22 23 24 25 26 27 |
# File 'lib/authrocket/credential.rb', line 22 def verify(code, attribs={}) params = parse_request_params(attribs.merge(code: code), json_root: json_root).reverse_merge credentials: api_creds parsed, _ = request(:post, resource_path+'/verify', params) load(parsed) errors.empty? ? self : false end |