Skip to content

fix!: IdTokenVerifier now throws IOException if any issue obtaining public keys. Adding retries to public key fetch to cover transient network issues. #934

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

Merged
merged 29 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
acb985f
verifier signature fix port
TimurSadykov Mar 23, 2022
1c16f8f
more test cases
TimurSadykov Mar 24, 2022
872f5f6
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Mar 25, 2022
70ac584
fix: more test fixes
TimurSadykov Mar 28, 2022
5dde913
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Mar 28, 2022
5c83d47
Update google-oauth-client/src/main/java/com/google/api/client/auth/o…
TimurSadykov Mar 30, 2022
17affb3
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Mar 30, 2022
4d34201
fix: restored original interface for verifier, added default http fac…
TimurSadykov Mar 31, 2022
9611f53
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Mar 31, 2022
8b55b29
Update google-oauth-client/src/main/java/com/google/api/client/auth/o…
TimurSadykov Mar 31, 2022
813bb20
Update google-oauth-client/src/main/java/com/google/api/client/auth/o…
TimurSadykov Mar 31, 2022
e065d1a
doc fixes
TimurSadykov Mar 31, 2022
1af2370
fix: better docs and logging of validation exceptions
TimurSadykov Apr 3, 2022
22178ca
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Apr 3, 2022
c8d01d3
Update google-oauth-client/src/main/java/com/google/api/client/auth/o…
TimurSadykov Apr 12, 2022
aca11aa
nit and linter fixes
TimurSadykov Apr 12, 2022
1d668f8
Merge remote-tracking branch 'origin/main' into stim-signer
TimurSadykov May 31, 2022
6cd7d8c
fix: add verify without signature verification, remove caching empty …
TimurSadykov May 31, 2022
964c5a8
fix: docs for a new method
TimurSadykov May 31, 2022
d51d221
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] May 31, 2022
8f9f8f1
fix: docs for a new method
TimurSadykov Jun 1, 2022
ff2474e
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jun 1, 2022
50eb0cc
fix: more test cases
TimurSadykov Jun 2, 2022
cc314d5
nit fixes for IdTokenVerifier
TimurSadykov Aug 12, 2022
7e7c69e
fix\!: IdtokenVerifier now throws IOException if any issue obtaining …
TimurSadykov Aug 19, 2022
3afaeaa
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 19, 2022
f7bcae2
merge with main
TimurSadykov Aug 19, 2022
0fe9873
fix: docs nit fixes
TimurSadykov Aug 25, 2022
c4e8d45
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Aug 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nit and linter fixes
  • Loading branch information
TimurSadykov committed Apr 12, 2022
commit aca11aad2fbce5d0d532d6be68ef1101a01256a5
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,19 @@ protected final HttpTransport getHttpTransport() {
*/
protected abstract PersistenceManagerFactory getPersistenceManagerFactory();

/** @return Specific ThreeLeggedFlow type that this callback should retreieve and complete. */
/**
* @return Specific ThreeLeggedFlow type that this callback should retreieve and complete.
*/
protected abstract Class<? extends ThreeLeggedFlow> getConcreteFlowType();

/** @return Url to redirect the user to upon a successful credential exchange. */
/**
* @return Url to redirect the user to upon a successful credential exchange.
*/
protected abstract String getSuccessRedirectUrl();

/** @return Url to redirect the user to upon failure. */
/**
* @return Url to redirect the user to upon failure.
*/
protected abstract String getDeniedRedirectUrl();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public abstract class AbstractOAuthGetToken extends GenericUrl {
/** {@code true} for POST request or the default {@code false} for GET request. */
protected boolean usePost;

/** @param authorizationServerUrl encoded authorization server URL */
/**
* @param authorizationServerUrl encoded authorization server URL
*/
protected AbstractOAuthGetToken(String authorizationServerUrl) {
super(authorizationServerUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public class OAuthAuthorizeTemporaryTokenUrl extends GenericUrl {
@Key("oauth_token")
public String temporaryToken;

/** @param encodedUserAuthorizationUrl encoded user authorization URL */
/**
* @param encodedUserAuthorizationUrl encoded user authorization URL
*/
public OAuthAuthorizeTemporaryTokenUrl(String encodedUserAuthorizationUrl) {
super(encodedUserAuthorizationUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ public class OAuthGetAccessToken extends AbstractOAuthGetToken {
*/
public String verifier;

/** @param authorizationServerUrl encoded authorization server URL */
/**
* @param authorizationServerUrl encoded authorization server URL
*/
public OAuthGetAccessToken(String authorizationServerUrl) {
super(authorizationServerUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public class OAuthGetTemporaryToken extends AbstractOAuthGetToken {
*/
public String callback;

/** @param authorizationServerUrl encoded authorization server URL */
/**
* @param authorizationServerUrl encoded authorization server URL
*/
public OAuthGetTemporaryToken(String authorizationServerUrl) {
super(authorizationServerUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ public class AuthorizationCodeResponseUrl extends GenericUrl {
@Key("error_uri")
private String errorUri;

/** @param encodedResponseUrl encoded authorization code response URL */
/**
* @param encodedResponseUrl encoded authorization code response URL
*/
public AuthorizationCodeResponseUrl(String encodedResponseUrl) {
super(encodedResponseUrl);
// either error or code but not both
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public final class StoredCredential implements Serializable {

public StoredCredential() {}

/** @param credential existing credential to copy from */
/**
* @param credential existing credential to copy from
*/
public StoredCredential(Credential credential) {
setAccessToken(credential.getAccessToken());
setRefreshToken(credential.getRefreshToken());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ public IdTokenVerifier() {
this(new Builder());
}

/** @param builder builder */
/**
* @param builder builder
*/
protected IdTokenVerifier(Builder builder) {
this.certificatesLocation = builder.certificatesLocation;
clock = builder.clock;
Expand Down Expand Up @@ -552,7 +554,6 @@ public Map<String, PublicKey> load(String certificateUrl) throws Exception {
| InvalidKeySpecException
| InvalidParameterSpecException ignored) {
LOGGER.log(Level.WARNING, "Failed to put a key into the cache", ignored);
ignored.printStackTrace();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@ public DailyMotionUrl(String encodedUrl) {
super(encodedUrl);
}

/** @return the fields */
/**
* @return the fields
*/
public String getFields() {
return fields;
}

/** @param fields the fields to set */
/**
* @param fields the fields to set
*/
public void setFields(String fields) {
this.fields = fields;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import com.google.api.client.util.Key;
import java.util.List;

/** @author Yaniv Inbar */
/**
* @author Yaniv Inbar
*/
public class Video {

@Key public String id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import com.google.api.client.util.Key;
import java.util.List;

/** @author Yaniv Inbar */
/**
* @author Yaniv Inbar
*/
public class VideoFeed {

@Key public List<Video> list;
Expand Down