class Fog::AWS::Storage::Credentials
Immutable snapshot of the credential-derived state needed to sign a request: the access key id, secret, session token, and the matching signer (v4) or HMAC (v2). These values are correlated. Under use_iam_profile they are all replaced together whenever credentials are refreshed.
Bundling them into one frozen object stored in a single instance variable lets a caller read a consistent set with one atomic reference read (see Real#request). Reading the fields as separate instance variables lets a refresh land between two reads and pair, for example, an old session token with a new signer, which S3 rejects with a 403. Keeping this connection safe to share across threads depends on never mutating an instance; build a new one and swap the reference.
Attributes
Public Class Methods
# File lib/fog/aws/storage.rb, line 148 def initialize(aws_access_key_id: nil, aws_secret_access_key: nil, aws_session_token: nil, signer: nil, hmac: nil) @aws_access_key_id = aws_access_key_id @aws_secret_access_key = aws_secret_access_key @aws_session_token = aws_session_token @signer = signer @hmac = hmac freeze end