@@ -33,12 +33,18 @@ class TestJwts {
3333
3434 static final String MCCOY_SUBJECT = "Leonard McCoy" ;
3535
36- static final JwtToken MC_COY = create ( MCCOY_SUBJECT , TEST_AUDIENCE , ROLES_CLAIM , TEST_ROLES_STRING ) ;
36+ static final String ISS = "ISSUER" ;
3737
38- static final JwtToken MC_COY_EXPIRED = create (MCCOY_SUBJECT , TEST_AUDIENCE , ROLES_CLAIM , TEST_ROLES_STRING , JwtConstants .CLAIM_EXPIRY , 10 );
38+ static final JwtToken MC_COY = create (MCCOY_SUBJECT , TEST_AUDIENCE , null , ROLES_CLAIM , TEST_ROLES_STRING );
39+
40+ static final JwtToken MC_COY_2 = create (MCCOY_SUBJECT , TEST_AUDIENCE , ISS , ROLES_CLAIM , TEST_ROLES_STRING );
41+
42+ static final JwtToken MC_COY_EXPIRED = create (MCCOY_SUBJECT , TEST_AUDIENCE , null , ROLES_CLAIM , TEST_ROLES_STRING , JwtConstants .CLAIM_EXPIRY , 10 );
3943
4044 static final String MC_COY_SIGNED_OCT_1 = createSigned (MC_COY , TestJwk .OCT_1 );
4145
46+ static final String MC_COY_SIGNED_OCT_2 = createSigned (MC_COY_2 , TestJwk .OCT_1 );
47+
4248 static final String MC_COY_SIGNED_OCT_1_INVALID_KID = createSigned (MC_COY , TestJwk .FORWARD_SLASH_KID_OCT_1 );
4349
4450 static final String MC_COY_SIGNED_RSA_1 = createSigned (MC_COY , TestJwk .RSA_1 );
@@ -57,11 +63,12 @@ static class PeculiarEscaping {
5763 static final String MC_COY_SIGNED_RSA_1 = createSignedWithPeculiarEscaping (MC_COY , TestJwk .RSA_1 );
5864 }
5965
60- static JwtToken create (String subject , String audience , Object ... moreClaims ) {
66+ static JwtToken create (String subject , String audience , String issuer , Object ... moreClaims ) {
6167 JwtClaims claims = new JwtClaims ();
6268
6369 claims .setSubject (subject );
6470 claims .setAudience (audience );
71+ claims .setIssuer (issuer );
6572
6673 if (moreClaims != null ) {
6774 for (int i = 0 ; i < moreClaims .length ; i += 2 ) {
@@ -108,8 +115,8 @@ static String createSignedWithPeculiarEscaping(JwtToken baseJwt, JsonWebKey jwk)
108115 static String createMcCoySignedOct1 (long nbf , long exp )
109116 {
110117 JwtToken jwt_token = create (
111- MCCOY_SUBJECT , TEST_AUDIENCE ,
112- ROLES_CLAIM , TEST_ROLES_STRING ,
118+ MCCOY_SUBJECT , TEST_AUDIENCE ,
119+ null , ROLES_CLAIM , TEST_ROLES_STRING ,
113120 JwtConstants .CLAIM_NOT_BEFORE , nbf ,
114121 JwtConstants .CLAIM_EXPIRY , exp );
115122
0 commit comments