This may resolve exceptions about AuthMode without AWSConfiguration at SubscriptionAuthorizer.getAuthorizationDetails() when AWSAppSyncClient.subscribe() is called.
To be improved following points:
SubscriptionAuthorizer detects AuthMode with/without AWSConfiguration as AWSAppSyncClient.Builder.build().
SubscriptionAuthorizer() validates whether AuthMode can be detected or not.
Problems:
SubscriptionAuthorizer.getAuthorizationDetails() behaves badly without AWSConfiguration because of following inconsistency with AWSAppSyncClient.Builder about AWSConfiguration.
In detail,
AWSAppSyncClient.Builder accepts building no AWSConfiguration clearly and detects AuthMode well.
Although above, SubscriptionAuthorizer gets AuthMode from only AWSConfiguration without any checking.
No tests for AWSAppSyncClient.Builder.build without AWSConfiguration.
Honestly, I created this for just a suggestion because I don't see the policy of the source codes and the purpose of 3.x. So, feel free to close this.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
257
Description of changes:
This may resolve exceptions about
AuthMode
withoutAWSConfiguration
atSubscriptionAuthorizer.getAuthorizationDetails()
whenAWSAppSyncClient.subscribe()
is called. To be improved following points:SubscriptionAuthorizer
detectsAuthMode
with/withoutAWSConfiguration
asAWSAppSyncClient.Builder.build()
.SubscriptionAuthorizer()
validates whetherAuthMode
can be detected or not.Problems:
SubscriptionAuthorizer.getAuthorizationDetails()
behaves badly withoutAWSConfiguration
because of following inconsistency withAWSAppSyncClient.Builder
aboutAWSConfiguration
. In detail,AWSAppSyncClient.Builder
accepts building noAWSConfiguration
clearly and detectsAuthMode
well.SubscriptionAuthorizer
getsAuthMode
from onlyAWSConfiguration
without any checking.AWSAppSyncClient.Builder.build
withoutAWSConfiguration
.Honestly, I created this for just a suggestion because I don't see the policy of the source codes and the purpose of 3.x. So, feel free to close this.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.