Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(experimentalIdentityAndAuth): Add generic @httpBearerAuth support #884

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

syall
Copy link
Contributor

@syall syall commented Aug 18, 2023

Issue #, if available:

N/A.

Description of changes:

NOTE: All of these are under the experimentalIdentityAndAuth feature flag

NOTE: Dependent on #881

  • Adding config properties token:
    /**
     * The token used to authenticate requests.
     */
    token?: TokenIdentity | TokenIdentityProvider;
  • @smithy/experimental-identity-and-auth package: add the TokenIdentity interface and TokenIdentityProvider type (these are still only in @aws-sdk/types currently), and default HttpBearerAuthSigner implementation.
  • Add back operations that support @httpBearerAuth in the generic client test

Testing:

  • @httpBearerAuth client codegen diff given the following model changes: https://gist.github.com/syall/a595c7738c380176a528ff29016f1c2c#file-httpbearerauth-trait-client-diff
     // feat(experimentalIdentityAndAuth): uncomment operations as individual
     //   auth scheme support is implemented
     // @httpApiKeyAuth(name: "X-Api-Key", in: "header")
    -// @httpBearerAuth
    +@httpBearerAuth
     // @sigv4(name: "weather")
     // @auth([sigv4])
     @paginated(inputToken: "nextToken", outputToken: "nextToken", pageSize: "pageSize")
    @@ -27,11 +27,12 @@ service Weather {
             //   auth scheme support is implemented
             // experimentalIdentityAndAuth
             // OnlyHttpApiKeyAuth
    -        // OnlyHttpBearerAuth
    +        OnlyHttpBearerAuth
             // OnlyHttpApiKeyAndBearerAuth
             // OnlyHttpApiKeyAndBearerAuthReversed
             // OnlyHttpApiKeyAuthOptional
    -        // SameAsService
    +        OnlyHttpBearerAuthOptional
    +        SameAsService
         ]
     }
  • No codegen diff for aws-sdk-js-v3

If one or more of the packages in the /packages directory has been modified, be sure yarn changeset add has been run and its output has
been committed and included in this pull request. See CONTRIBUTING.md.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@syall syall force-pushed the add-generic-httpBearerAuth-support branch 4 times, most recently from d54afdf to dbf1138 Compare August 22, 2023 00:15
@syall syall force-pushed the add-generic-httpBearerAuth-support branch 5 times, most recently from 0e96a07 to eef15ab Compare August 23, 2023 00:10
@syall syall force-pushed the add-generic-httpBearerAuth-support branch from eef15ab to 4499d58 Compare August 31, 2023 19:38
@syall syall marked this pull request as ready for review August 31, 2023 19:46
@syall syall requested review from a team as code owners August 31, 2023 19:46
@syall syall force-pushed the add-generic-httpBearerAuth-support branch from 4499d58 to 174f697 Compare August 31, 2023 23:04
@syall syall force-pushed the add-generic-httpBearerAuth-support branch from 174f697 to f987062 Compare September 1, 2023 21:17
@syall syall force-pushed the add-generic-httpBearerAuth-support branch from f987062 to 7a86b99 Compare September 1, 2023 21:18
@syall syall merged commit 7dc6d76 into smithy-lang:main Sep 1, 2023
@syall syall deleted the add-generic-httpBearerAuth-support branch September 7, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants