diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/auth/built-in/BearerTokenAuthScheme.h b/src/aws-cpp-sdk-core/include/smithy/identity/auth/built-in/BearerTokenAuthScheme.h index 15c654adb2c..7a682a74396 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/auth/built-in/BearerTokenAuthScheme.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/auth/built-in/BearerTokenAuthScheme.h @@ -29,7 +29,7 @@ namespace smithy { const Aws::String& region) : AuthScheme(BEARER_SIGNER), m_identityResolver{identityResolver}, - m_signer{Aws::MakeShared("BearerTokenAuthScheme", serviceName, region)} + m_signer{Aws::MakeShared("BearerTokenAuthScheme", serviceName, region)} { assert(m_identityResolver); assert(m_signer); diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentity.h b/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentity.h index 4a0fffc585f..09c09ae9eb9 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentity.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentity.h @@ -9,9 +9,9 @@ namespace smithy { class AwsBearerTokenIdentity : public AwsBearerTokenIdentityBase { public: - virtual Aws::String token() override; + virtual Aws::String token() const override; - virtual Aws::Crt::Optional expiration() override; + virtual Aws::Crt::Optional expiration() const override; protected: Aws::String m_token; diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentityBase.h b/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentityBase.h index bb4aabe2204..4b82e453d67 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentityBase.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/identity/AwsBearerTokenIdentityBase.h @@ -9,8 +9,8 @@ namespace smithy { class AwsBearerTokenIdentityBase : public AwsIdentity { public: - virtual Aws::String token() = 0; + virtual Aws::String token() const = 0; - virtual Aws::Crt::Optional expiration() override = 0 ; + virtual Aws::Crt::Optional expiration() const override = 0 ; }; } \ No newline at end of file diff --git a/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/BearerTokenSigner.h b/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/BearerTokenSigner.h index 403aea01337..7249732756d 100644 --- a/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/BearerTokenSigner.h +++ b/src/aws-cpp-sdk-core/include/smithy/identity/signer/built-in/BearerTokenSigner.h @@ -28,13 +28,18 @@ namespace smithy { class BearerTokenSigner : public AwsSignerBase { public: + static const char LOGGING_TAG[]; + //using SigV4aAuthSchemeParameters = smithy::DefaultAuthSchemeResolverParameters; - explicit BearerTokenSigner() + explicit BearerTokenSigner(const Aws::String& serviceName, const Aws::String& region) + : m_serviceName(serviceName), m_region(region) { } SigningFutureOutcome sign(std::shared_ptr httpRequest, const smithy::AwsBearerTokenIdentityBase& identity, SigningProperties properties) override { + AWS_UNREFERENCED_PARAM(properties); + if(Aws::Http::Scheme::HTTPS != httpRequest->GetUri().GetScheme()) { // Clients MUST always use TLS (https) or equivalent transport security @@ -52,5 +57,9 @@ namespace smithy { virtual ~BearerTokenSigner() {}; protected: + Aws::String m_serviceName; + Aws::String m_region; }; + + const char BearerTokenSigner::LOGGING_TAG[] = "BearerTokenSigner"; }