-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add OAuth2AuthCredentials class and tests #1030
Conversation
public class AuthCredentialsTest { | ||
|
||
private static final String ACCESS_TOKEN = "accessToken"; | ||
private static final Date EXPIRATION_DATE = new Date(); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM - You can ignore my ask about Date(). It would only be appropriate if somewhere you tested to see if a token / credential was still valid. In looking through more of the code, I see that refresh is specifically disabled for some token kinds. Somewhere there should be token expiration validation / refresh that happens, but not in any of your tests, nor the paths I traced through. |
@lesv Thanks for the pass. Refresh is handled by |
Do you prefer that I merge your code on LGTM, or will you do it? Thanks. |
I will take care of merging, thanks. |
…in aiplatform v1 index_service.proto (#1030) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 469481982 Source-Link: googleapis/googleapis@e4fe55a Source-Link: https://github.com/googleapis/googleapis-gen/commit/1ff3c40d85fe8f13538b0f2264d60f806d744fd2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWZmM2M0MGQ4NWZlOGYxMzUzOGIwZjIyNjRkNjBmODA2ZDc0NGZkMiJ9 feat: add UpsertDatapoints and RemoveDatapoints rpcs to IndexService in aiplatform v1beta1 index_service.proto PiperOrigin-RevId: 469481692 Source-Link: googleapis/googleapis@624cc45 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fd6880812cab6b3434a7e1d339a99907698f9508 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmQ2ODgwODEyY2FiNmIzNDM0YTdlMWQzMzlhOTk5MDc2OThmOTUwOCJ9
🤖 I have created a release *beep* *boop* --- ## [3.3.0](googleapis/java-aiplatform@v3.2.0...v3.3.0) (2022-09-15) ### Features * add input_artifacts to PipelineJob.runtime_config in aiplatform v1 pipeline_job ([ff7a4ab](googleapis/java-aiplatform@ff7a4ab)) * Add model_monitoring_stats_anomalies,model_monitoring_status to BatchPredictionJob in aiplatform v1beta1 batch_prediction_job.proto ([#1041](googleapis/java-aiplatform#1041)) ([fe03c60](googleapis/java-aiplatform@fe03c60)) * Add read_mask to ListPipelineJobsRequest in aiplatform v1 pipeline_service ([#1032](googleapis/java-aiplatform#1032)) ([ff7a4ab](googleapis/java-aiplatform@ff7a4ab)) * Add UpsertDatapoints and RemoveDatapoints rpcs to IndexService in aiplatform v1 index_service.proto ([#1030](googleapis/java-aiplatform#1030)) ([4114021](googleapis/java-aiplatform@4114021)) * add UpsertDatapoints and RemoveDatapoints rpcs to IndexService in aiplatform v1beta1 index_service.proto ([4114021](googleapis/java-aiplatform@4114021)) * Add WriteFeatureValues in aiplatform v1beta1 featurestore_online_service.proto ([#1022](googleapis/java-aiplatform#1022)) ([267827e](googleapis/java-aiplatform@267827e)) ### Dependencies * Update dependency com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1 to v0.18.0 ([#1021](googleapis/java-aiplatform#1021)) ([c3d34a0](googleapis/java-aiplatform@c3d34a0)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.14.5 ([#1016](googleapis/java-aiplatform#1016)) ([cc0af7b](googleapis/java-aiplatform@cc0af7b)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.14.6 ([#1026](googleapis/java-aiplatform#1026)) ([6ed66cc](googleapis/java-aiplatform@6ed66cc)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.14.7 ([#1031](googleapis/java-aiplatform#1031)) ([5adefd4](googleapis/java-aiplatform@5adefd4)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.15.0 ([#1040](googleapis/java-aiplatform#1040)) ([b6c1b20](googleapis/java-aiplatform@b6c1b20)) * Update dependency com.google.cloud:google-cloud-bigquery to v2.16.0 ([#1044](googleapis/java-aiplatform#1044)) ([5ce52e5](googleapis/java-aiplatform@5ce52e5)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#1043](googleapis/java-aiplatform#1043)) ([40eae55](googleapis/java-aiplatform@40eae55)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#1045](googleapis/java-aiplatform#1045)) ([0f66302](googleapis/java-aiplatform@0f66302)) * Update dependency com.google.cloud:google-cloud-storage to v2.11.3 ([#1015](googleapis/java-aiplatform#1015)) ([7a2fcb0](googleapis/java-aiplatform@7a2fcb0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…telligence to v2.2.9 (#1030) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-video-intelligence](https://togithub.com/googleapis/java-video-intelligence) | `2.2.7` -> `2.2.10` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-intelligence/2.2.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-intelligence/2.2.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-intelligence/2.2.10/compatibility-slim/2.2.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-video-intelligence/2.2.10/confidence-slim/2.2.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-video-intelligence). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMDguMiIsInVwZGF0ZWRJblZlciI6IjMyLjIwOC4yIn0=-->
…googleapis#1030) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-core](https://togithub.com/googleapis/java-core) | `2.8.19` -> `2.8.20` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.20/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.20/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.20/compatibility-slim/2.8.19)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-core/2.8.20/confidence-slim/2.8.19)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-core</summary> ### [`v2.8.20`](https://togithub.com/googleapis/java-core/blob/HEAD/CHANGELOG.md#​2820-httpsgithubcomgoogleapisjava-corecomparev2819v2820-2022-10-02) [Compare Source](https://togithub.com/googleapis/java-core/compare/v2.8.19...v2.8.20) ##### Dependencies - Update dependency com.google.api:gax-bom to v2.19.2 ([#&googleapis#8203;969](https://togithub.com/googleapis/java-core/issues/969)) ([1151449](https://togithub.com/googleapis/java-core/commit/1151449c061ab51c45982444db5f9da9d2ce4fb7)) - Update dependency com.google.api.grpc:proto-google-common-protos to v2.9.6 ([#&googleapis#8203;967](https://togithub.com/googleapis/java-core/issues/967)) ([4a7b524](https://togithub.com/googleapis/java-core/commit/4a7b524fa366484825bedbc0a4f86d4551a6a0e8)) - Update dependency io.grpc:grpc-bom to v1.49.2 ([#&googleapis#8203;966](https://togithub.com/googleapis/java-core/issues/966)) ([b7738aa](https://togithub.com/googleapis/java-core/commit/b7738aa71fb9cf0994e4ad1dae4bae433754cda0)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dialogflow). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTMuMCIsInVwZGF0ZWRJblZlciI6IjMyLjIxMy4xIn0=-->
…1.3 (googleapis#1030) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:libraries-bom](https://cloud.google.com/java/docs/bom) ([source](https://togithub.com/googleapis/java-cloud-bom)) | `26.1.2` -> `26.1.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/compatibility-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:libraries-bom/26.1.3/confidence-slim/26.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-dlp). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTkuMSIsInVwZGF0ZWRJblZlciI6IjMyLjIxOS4xIn0=-->
🤖 I have created a release *beep* *boop* --- ## [4.9.1](https://togithub.com/googleapis/java-dialogflow/compare/v4.9.0...v4.9.1) (2022-10-07) ### Dependencies * Update dependency com.google.cloud:google-cloud-core to v2.8.20 ([googleapis#1030](https://togithub.com/googleapis/java-dialogflow/issues/1030)) ([c59fb53](https://togithub.com/googleapis/java-dialogflow/commit/c59fb53f5e1d63596e35442ed4f95fd85dc4572e)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [3.1.3](https://togithub.com/googleapis/java-vision/compare/v3.1.2...v3.1.3) (2022-10-10) ### Dependencies * Update dependency com.google.cloud:google-cloud-core to v2.8.20 ([#1025](https://togithub.com/googleapis/java-vision/issues/1025)) ([58fe519](https://togithub.com/googleapis/java-vision/commit/58fe51939b6d01cfa2938ed728d33a57e7f6ddea)) * Update dependency com.google.cloud:google-cloud-storage to v2.13.0 ([#1029](https://togithub.com/googleapis/java-vision/issues/1029)) ([c95aa77](https://togithub.com/googleapis/java-vision/commit/c95aa778efb1710fe60b1c6b1316c5f75a334cc2)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Co-authored-by: Anthonios Partheniou <[email protected]> Source-Link: googleapis/synthtool@9457e69 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:a3fe0b4c75f322520f548e535ed329df1e475ace3cb4a979b78e003cb822636a Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
This PR adds the
OAuth2AuthCredentials
class to fix #1029. Unit tests are added to fix #1028/cc @lesv