Class: Mediaflux::TokenCreateRequest
- Defined in:
- app/models/mediaflux/token_create_request.rb
Instance Attribute Summary
Attributes inherited from Request
Class Method Summary collapse
-
.service ⇒ String
Specifies the logon service within the Mediaflux API.
Instance Method Summary collapse
- #identity ⇒ Object
-
#initialize(session_token:, domain:, user:) ⇒ TokenCreateRequest
constructor
A new instance of TokenCreateRequest.
Methods inherited from Request
build_post_request, default_xml_namespace, default_xml_namespace_uri, #error?, find_or_create_http_client, format_date_for_mediaflux, request_path, #resolve, #resolved?, #response_body, #response_error, #response_xml, uri, #xml_payload, #xtoshell_xml
Constructor Details
#initialize(session_token:, domain:, user:) ⇒ TokenCreateRequest
Returns a new instance of TokenCreateRequest.
10 11 12 13 14 |
# File 'app/models/mediaflux/token_create_request.rb', line 10 def initialize(session_token:, domain:, user:) @domain = domain @user = user super(session_token: session_token) end |
Class Method Details
.service ⇒ String
Specifies the logon service within the Mediaflux API
6 7 8 |
# File 'app/models/mediaflux/token_create_request.rb', line 6 def self.service "secure.identity.token.create" end |
Instance Method Details
#identity ⇒ Object
16 17 18 19 |
# File 'app/models/mediaflux/token_create_request.rb', line 16 def identity @id ||= response_xml.xpath("/response/reply/result/token").text.strip @id end |