class Baidubce::Services::StsClient
Constants
- GET_SESSION_TOKEN_PATH
- GET_SESSION_TOKEN_VERSION
- STS_URL_PREFIX
Public Instance Methods
get_session_token(acl, duration_seconds=nil)
click to toggle source
# File lib/baidubce/services/sts/sts_client.rb, line 26 def get_session_token(acl, duration_seconds=nil) params = duration_seconds.nil? ? {} : { durationSeconds: duration_seconds } headers = { CONTENT_TYPE => JSON_TYPE } body = acl.to_json path = Utils.append_uri(STS_URL_PREFIX, GET_SESSION_TOKEN_VERSION, GET_SESSION_TOKEN_PATH) body, headers = @http_client.send_request(@config, @signer, POST, path, params, headers, body) Utils.generate_response(headers, body, false) end