java-docs-samples
java-docs-samples copied to clipboard
feat: Java SDK Api Key authorization sample
Description
Java Cloud SDK introduced a new API to allow users to authenticate via an API key. This provides a sample usage of the new setApiKey function.
Checklist
- [X] I have followed Sample Format Guide
- [X]
pom.xmlparent set to latestshared-configuration - [X] Appropriate changes to README are included in PR
- [ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
- [ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
- [X] Tests pass:
mvn clean verifyrequired - [X] Lint passes:
mvn -P lint checkstyle:checkrequired - [x] Static Analysis:
mvn -P lint clean compile pmd:cpd-check spotbugs:checkadvisory only - [ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
- [ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
- [X] Please merge this PR for me once it is approved
Here is the summary of changes.
You are about to add 2 region tags.
-
auth/src/main/java/com/google/cloud/auth/samples/ApiKeyAuthExample.java:19, tag
auth_cloud_api_key -
auth/src/main/java/com/google/cloud/auth/samples/ApiKeyAuthExample.java:33, tag
auth_cloud_api_key
This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:
- [ ] Refresh this comment