Module: KazeClient::Utils::AuthentifiedRequest
- Included in:
- AddTagRequest, AssignPerformerRequest, CancelJobRequest, Collection::Item::CreateLinkRequest, Collection::ItemRequest, Collection::ItemsRequest, CollectionRequest, CollectionsRequest, CompleteStepRequest, CreateCollectionItemRequest, CreateJobRequest, JobDocumentRequest, JobRequest, JobWorkflowRequest, JobWorkflowsRequest, JobsRequest, PartnersRequest, ProfileRequest, TagRequest, TagsRequest, KazeClient::UpdateTemplateRequest, KazeClient::UploadAttachmentRequest, KazeClient::UploadImageRequest, KazeClient::UsersRequest
- Defined in:
- lib/kaze_client/request/requests/utils/authentified_request.rb
Overview
Included by the request where an authentication token is required.
Instance Attribute Summary collapse
-
#token ⇒ String
readonly
The authentication token.
Instance Method Summary collapse
-
#with_token(token) ⇒ KazeClient::Utils::AuthentifiedRequest
Store the given authentication token and use it to set the
Authorization
header of the request.
Instance Attribute Details
#token ⇒ String (readonly)
Returns The authentication token.
14 15 16 |
# File 'lib/kaze_client/request/requests/utils/authentified_request.rb', line 14 def token @token end |
Instance Method Details
#with_token(token) ⇒ KazeClient::Utils::AuthentifiedRequest
Store the given authentication token and use it to set the Authorization
header of the request.
20 21 22 23 24 25 |
# File 'lib/kaze_client/request/requests/utils/authentified_request.rb', line 20 def with_token(token) @token = token @headers['Authorization'] = token self end |