From c01d95e3f6731a854082ba46d6db6c1afccf49dc Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 4 Aug 2019 09:58:27 -0400 Subject: [PATCH 1/5] update URLs --- .../client/json/webtoken/JsonWebToken.java | 12 ++--- .../.classpath | 30 +++++++++--- .../.project | 46 +++++++++++-------- .../.settings/org.eclipse.jdt.core.prefs | 8 ++-- .../DailyMotionSample.launch | 20 ++++---- 5 files changed, 69 insertions(+), 47 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java index f7c19d543..f68450190 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebToken.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Google Inc. + * Copyright 2012 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -22,7 +22,7 @@ import java.util.List; /** - * JSON Web Token (JWT). + * JSON Web Token (JWT). * *

Implementation is not thread-safe. * @@ -47,8 +47,8 @@ public JsonWebToken(Header header, Payload payload) { } /** - * Header as specified in JWT Header. + * Header as specified in + * JWT Header. */ public static class Header extends GenericJson { @@ -115,8 +115,8 @@ public Header clone() { } /** - * Payload as specified in Reserved Claim + * Payload as specified in + * Reserved Claim * Names. */ public static class Payload extends GenericJson { diff --git a/samples/dailymotion-simple-cmdline-sample/.classpath b/samples/dailymotion-simple-cmdline-sample/.classpath index f3de25032..73f6d153f 100644 --- a/samples/dailymotion-simple-cmdline-sample/.classpath +++ b/samples/dailymotion-simple-cmdline-sample/.classpath @@ -1,9 +1,27 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/dailymotion-simple-cmdline-sample/.project b/samples/dailymotion-simple-cmdline-sample/.project index 1d87e91e0..c1755eba3 100644 --- a/samples/dailymotion-simple-cmdline-sample/.project +++ b/samples/dailymotion-simple-cmdline-sample/.project @@ -1,23 +1,29 @@ - dailymotion-simple-cmdline-sample - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - + dailymotion-simple-cmdline-sample + + + + + + org.eclipse.jdt.core.javabuilder + + + + + net.sf.eclipsecs.core.CheckstyleBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + net.sf.eclipsecs.core.CheckstyleNature + diff --git a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs b/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs index 652b81273..e1dede719 100644 --- a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs +++ b/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,3 @@ -#Fri Nov 04 10:10:39 EDT 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.codeComplete.argumentPrefixes= org.eclipse.jdt.core.codeComplete.argumentSuffixes= @@ -11,9 +10,9 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -81,7 +80,8 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.7 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 diff --git a/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch b/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch index e273fce30..98d4671bf 100644 --- a/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch +++ b/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch @@ -1,14 +1,12 @@ - - - - - - - - - - - + + + + + + + + + From 79f26f2f521f7137673b0e416d895890b91cc637 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 4 Aug 2019 10:01:43 -0400 Subject: [PATCH 2/5] fix .gitignore for eclipse --- .gitignore | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3ca4b1fa5..cb264df74 100644 --- a/.gitignore +++ b/.gitignore @@ -17,13 +17,15 @@ nosetests.xml # Mr Developer .mr.developer.cfg -.project + +**/.project .pydevproject *.iml .idea .settings .DS_Store -.classpath +**/.classpath +**/.checkstyle # Built documentation docs/ From 350d42e71d2da6c06d0b9b43b19415e5e925e4c2 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 4 Aug 2019 10:02:47 -0400 Subject: [PATCH 3/5] fix .gitignore for eclipse --- .../.classpath | 27 ----------------- .../.project | 29 ------------------- 2 files changed, 56 deletions(-) delete mode 100644 samples/dailymotion-simple-cmdline-sample/.classpath delete mode 100644 samples/dailymotion-simple-cmdline-sample/.project diff --git a/samples/dailymotion-simple-cmdline-sample/.classpath b/samples/dailymotion-simple-cmdline-sample/.classpath deleted file mode 100644 index 73f6d153f..000000000 --- a/samples/dailymotion-simple-cmdline-sample/.classpath +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/dailymotion-simple-cmdline-sample/.project b/samples/dailymotion-simple-cmdline-sample/.project deleted file mode 100644 index c1755eba3..000000000 --- a/samples/dailymotion-simple-cmdline-sample/.project +++ /dev/null @@ -1,29 +0,0 @@ - - - dailymotion-simple-cmdline-sample - - - - - - org.eclipse.jdt.core.javabuilder - - - - - net.sf.eclipsecs.core.CheckstyleBuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - net.sf.eclipsecs.core.CheckstyleNature - - From 2cd14c817da60decb96741559dd12a1ca203d57e Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 4 Aug 2019 10:07:08 -0400 Subject: [PATCH 4/5] fix .gitignore for eclipse --- .../.settings/org.eclipse.jdt.core.prefs | 8 ++++---- .../DailyMotionSample.launch | 20 ++++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs b/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs index e1dede719..652b81273 100644 --- a/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs +++ b/samples/dailymotion-simple-cmdline-sample/.settings/org.eclipse.jdt.core.prefs @@ -1,3 +1,4 @@ +#Fri Nov 04 10:10:39 EDT 2011 eclipse.preferences.version=1 org.eclipse.jdt.core.codeComplete.argumentPrefixes= org.eclipse.jdt.core.codeComplete.argumentSuffixes= @@ -10,9 +11,9 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate @@ -80,8 +81,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=569 org.eclipse.jdt.core.formatter.alignment_for_annotations_on_member=569 diff --git a/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch b/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch index 98d4671bf..e273fce30 100644 --- a/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch +++ b/samples/dailymotion-simple-cmdline-sample/DailyMotionSample.launch @@ -1,12 +1,14 @@ - - - - - - - - - + + + + + + + + + + + From 650d83a0ff91313de5f17d3fac983924baef5a5d Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Mon, 5 Aug 2019 06:18:32 -0400 Subject: [PATCH 5/5] update link to JSON Web signature spec --- .../json/webtoken/JsonWebSignature.java | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java index 4d5775c65..0777c8b92 100644 --- a/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java +++ b/google-http-client/src/main/java/com/google/api/client/json/webtoken/JsonWebSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Google Inc. + * Copyright 2012 Google LLC. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at @@ -38,15 +38,14 @@ import javax.net.ssl.X509TrustManager; /** - * JSON Web Signature - * (JWS). + * JSON Web Signature(JWS). * *

Sample usage: * *

  * public static void printPayload(JsonFactory jsonFactory, String tokenString) throws IOException {
- * JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
- * System.out.println(jws.getPayload());
+ *   JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
+ *   System.out.println(jws.getPayload());
  * }
  * 
* @@ -67,7 +66,7 @@ public class JsonWebSignature extends JsonWebToken { * @param header header * @param payload payload * @param signatureBytes bytes of the signature - * @param signedContentBytes bytes of the signature content + * @param signedContentBytes bytes of the signed content */ public JsonWebSignature( Header header, Payload payload, byte[] signatureBytes, byte[] signedContentBytes) { @@ -77,8 +76,8 @@ public JsonWebSignature( } /** - * Header as specified in Reserved + * Header as specified in + * Reserved * Header Parameter Names. */ public static class Header extends JsonWebToken.Header { @@ -406,11 +405,11 @@ public final boolean verifySignature(PublicKey publicKey) throws GeneralSecurity * *

The leaf certificate of the certificate chain must be an SSL server certificate. * - * @param trustManager Trust manager used to verify the X509 certificate chain embedded in this - * message. - * @return The signature certificate if the signature could be verified, null otherwise. + * @param trustManager trust manager used to verify the X509 certificate chain embedded in this + * message + * @return the signature certificate if the signature could be verified, null otherwise * @throws GeneralSecurityException - * @since 1.19.1. + * @since 1.19.1 */ @Beta public final X509Certificate verifySignature(X509TrustManager trustManager) @@ -441,7 +440,7 @@ public final X509Certificate verifySignature(X509TrustManager trustManager) * *

The leaf certificate of the certificate chain must be an SSL server certificate. * - * @return The signature certificate if the signature could be verified, null otherwise. + * @return the signature certificate if the signature could be verified, null otherwise * @throws GeneralSecurityException * @since 1.19.1. */