1- package com .auth0 .jwt ;
1+ package com .auth0 .jwt . creators ;
22
33import com .auth0 .jwt .algorithms .Algorithm ;
44import com .auth0 .jwt .exceptions .JWTCreationException ;
@@ -27,9 +27,7 @@ public GoogleJwtCreator() {
2727 put ("Picture" , false );
2828 put ("Issuer" , false );
2929 put ("Subject" , false );
30- put ("Audience" , false );
3130 put ("Iat" , false );
32- put ("Exp" , false );
3331 }};
3432 publicClaims = new HashSet <String >() {{
3533 add (PublicClaims .ISSUER );
@@ -49,7 +47,7 @@ public GoogleJwtCreator() {
4947 * @param name the Name value.
5048 * @return this same Builder instance.
5149 */
52- protected GoogleJwtCreator withName (String name ) {
50+ public GoogleJwtCreator withName (String name ) {
5351 jwt .withNonStandardClaim ("name" , name );
5452 addedClaims .put ("Name" , true );
5553 return this ;
@@ -61,7 +59,7 @@ protected GoogleJwtCreator withName(String name) {
6159 * @param email the Email value.
6260 * @return this same Builder instance.
6361 */
64- GoogleJwtCreator withEmail (String email ) {
62+ public GoogleJwtCreator withEmail (String email ) {
6563 jwt .withNonStandardClaim ("email" , email );
6664 addedClaims .put ("Email" , true );
6765 return this ;
@@ -73,7 +71,7 @@ GoogleJwtCreator withEmail(String email) {
7371 * @param picture the Picture value.
7472 * @return this same Builder instance.
7573 */
76- protected GoogleJwtCreator withPicture (String picture ) {
74+ public GoogleJwtCreator withPicture (String picture ) {
7775 jwt .withNonStandardClaim ("picture" , picture );
7876 addedClaims .put ("Picture" , true );
7977 return this ;
@@ -114,7 +112,6 @@ public GoogleJwtCreator withSubject(String... subject) {
114112 */
115113 public GoogleJwtCreator withAudience (String ... audience ) {
116114 jwt .withAudience (audience );
117- addedClaims .put ("Audience" , true );
118115 return this ;
119116 }
120117
@@ -138,7 +135,6 @@ public GoogleJwtCreator withIat(Date iat) {
138135 */
139136 public GoogleJwtCreator withExp (Date exp ) {
140137 jwt .withExpiresAt (exp );
141- addedClaims .put ("Exp" , true );
142138 return this ;
143139 }
144140
0 commit comments