1
1
/*
2
- * Copyright (c) 2012 Google Inc .
2
+ * Copyright 2012 Google LLC .
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5
5
* in compliance with the License. You may obtain a copy of the License at
38
38
import javax .net .ssl .X509TrustManager ;
39
39
40
40
/**
41
- * <a href="http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-11">JSON Web Signature
42
- * (JWS)</a>.
41
+ * <a href="https://tools.ietf.org/html/rfc7515">JSON Web Signature(JWS)</a>.
43
42
*
44
43
* <p>Sample usage:
45
44
*
46
45
* <pre>
47
46
* public static void printPayload(JsonFactory jsonFactory, String tokenString) throws IOException {
48
- * JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
49
- * System.out.println(jws.getPayload());
47
+ * JsonWebSignature jws = JsonWebSignature.parse(jsonFactory, tokenString);
48
+ * System.out.println(jws.getPayload());
50
49
* }
51
50
* </pre>
52
51
*
@@ -67,7 +66,7 @@ public class JsonWebSignature extends JsonWebToken {
67
66
* @param header header
68
67
* @param payload payload
69
68
* @param signatureBytes bytes of the signature
70
- * @param signedContentBytes bytes of the signature content
69
+ * @param signedContentBytes bytes of the signed content
71
70
*/
72
71
public JsonWebSignature (
73
72
Header header , Payload payload , byte [] signatureBytes , byte [] signedContentBytes ) {
@@ -77,8 +76,8 @@ public JsonWebSignature(
77
76
}
78
77
79
78
/**
80
- * Header as specified in <a
81
- * href="http ://tools.ietf.org/html/draft-ietf-jose-json-web-signature-11 #section-4.1">Reserved
79
+ * Header as specified in
80
+ * <a href="https ://tools.ietf.org/html/rfc7515 #section-4.1">Reserved
82
81
* Header Parameter Names</a>.
83
82
*/
84
83
public static class Header extends JsonWebToken .Header {
@@ -406,11 +405,11 @@ public final boolean verifySignature(PublicKey publicKey) throws GeneralSecurity
406
405
*
407
406
* <p>The leaf certificate of the certificate chain must be an SSL server certificate.
408
407
*
409
- * @param trustManager Trust manager used to verify the X509 certificate chain embedded in this
410
- * message.
411
- * @return The signature certificate if the signature could be verified, null otherwise.
408
+ * @param trustManager trust manager used to verify the X509 certificate chain embedded in this
409
+ * message
410
+ * @return the signature certificate if the signature could be verified, null otherwise
412
411
* @throws GeneralSecurityException
413
- * @since 1.19.1.
412
+ * @since 1.19.1
414
413
*/
415
414
@ Beta
416
415
public final X509Certificate verifySignature (X509TrustManager trustManager )
@@ -441,7 +440,7 @@ public final X509Certificate verifySignature(X509TrustManager trustManager)
441
440
*
442
441
* <p>The leaf certificate of the certificate chain must be an SSL server certificate.
443
442
*
444
- * @return The signature certificate if the signature could be verified, null otherwise.
443
+ * @return the signature certificate if the signature could be verified, null otherwise
445
444
* @throws GeneralSecurityException
446
445
* @since 1.19.1.
447
446
*/
0 commit comments