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

Add OAuth2AuthCredentials class and tests #1030

Merged
merged 1 commit into from
May 28, 2016

Conversation

mziccard
Copy link
Contributor

This PR adds the OAuth2AuthCredentials class to fix #1029. Unit tests are added to fix #1028

/cc @lesv

@mziccard mziccard added the auth label May 27, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 27, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 86.028% when pulling 2155be3 on mziccard:oauth-credentials into fceeb65 on GoogleCloudPlatform:master.

public class AuthCredentialsTest {

private static final String ACCESS_TOKEN = "accessToken";
private static final Date EXPIRATION_DATE = new Date();

This comment was marked as spam.

@lesv
Copy link
Contributor

lesv commented May 27, 2016

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.

@mziccard
Copy link
Contributor Author

@lesv Thanks for the pass.

Refresh is handled by google-auth-library-java's classes. It happens when getRequestMetadata(Uri) is called on a credentials object with expired token.

@lesv
Copy link
Contributor

lesv commented May 28, 2016

Do you prefer that I merge your code on LGTM, or will you do it? Thanks.

@mziccard
Copy link
Contributor Author

I will take care of merging, thanks.

@mziccard mziccard merged commit 11f4573 into googleapis:master May 28, 2016
github-actions bot pushed a commit that referenced this pull request Aug 24, 2022
…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
github-actions bot pushed a commit that referenced this pull request Sep 19, 2022
🤖 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).
@release-please release-please bot mentioned this pull request Sep 23, 2022
github-actions bot pushed a commit that referenced this pull request Oct 4, 2022
…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://github.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=-->
github-actions bot pushed a commit to yoshi-code-bot/google-cloud-java that referenced this pull request Oct 6, 2022
…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://github.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://github.com/googleapis/java-core/blob/HEAD/CHANGELOG.md#&#8203;2820-httpsgithubcomgoogleapisjava-corecomparev2819v2820-2022-10-02)

[Compare Source](https://github.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://github.com/googleapis/java-core/issues/969)) ([1151449](https://github.com/googleapis/java-core/commit/1151449c061ab51c45982444db5f9da9d2ce4fb7))
-   Update dependency com.google.api.grpc:proto-google-common-protos to v2.9.6 ([#&googleapis#8203;967](https://github.com/googleapis/java-core/issues/967)) ([4a7b524](https://github.com/googleapis/java-core/commit/4a7b524fa366484825bedbc0a4f86d4551a6a0e8))
-   Update dependency io.grpc:grpc-bom to v1.49.2 ([#&googleapis#8203;966](https://github.com/googleapis/java-core/issues/966)) ([b7738aa](https://github.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=-->
github-actions bot pushed a commit to renovate-bot/google-cloud-java that referenced this pull request Oct 8, 2022
…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://github.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=-->
github-actions bot pushed a commit to renovate-bot/google-cloud-java that referenced this pull request Oct 8, 2022
github-actions bot pushed a commit that referenced this pull request Nov 16, 2022
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
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 <partheniou@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide means to create AuthCredentials given an OAuth2 access token We should add tests for AuthCredentials
4 participants