@@ -37,7 +37,6 @@ public void testIncorrectResponseTypeThrowsError() {
3737 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
3838 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
3939 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
40- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
4140 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
4241 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
4342 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
@@ -53,7 +52,6 @@ public void testIncorrectResponseTypeThrowsError() {
5352 public void testMissingAuthorizationEndpointThrowsError () {
5453 final Settings .Builder settingsBuilder = Settings .builder ()
5554 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
56- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
5755 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
5856 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
5957 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
@@ -73,7 +71,6 @@ public void testInvalidAuthorizationEndpointThrowsError() {
7371 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
7472 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
7573 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
76- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
7774 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
7875 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
7976 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_CLIENT_ID ), "rp-my" )
@@ -90,7 +87,6 @@ public void testMissingTokenEndpointThrowsError() {
9087 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
9188 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
9289 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
93- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
9490 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
9591 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
9692 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_CLIENT_ID ), "rp-my" )
@@ -108,7 +104,6 @@ public void testInvalidTokenEndpointThrowsError() {
108104 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
109105 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
110106 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "This is not a uri" )
111- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
112107 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
113108 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
114109 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_CLIENT_ID ), "rp-my" )
@@ -124,7 +119,6 @@ public void testMissingJwksUrlThrowsError() {
124119 final Settings .Builder settingsBuilder = Settings .builder ()
125120 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
126121 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
127- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
128122 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
129123 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
130124 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_CLIENT_ID ), "rp-my" )
@@ -140,7 +134,6 @@ public void testMissingIssuerThrowsError() {
140134 final Settings .Builder settingsBuilder = Settings .builder ()
141135 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
142136 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
143- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
144137 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
145138 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
146139 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
@@ -153,30 +146,12 @@ public void testMissingIssuerThrowsError() {
153146 Matchers .containsString (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER )));
154147 }
155148
156- public void testMissingNameTypeThrowsError () {
157- final Settings .Builder settingsBuilder = Settings .builder ()
158- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
159- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
160- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
161- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
162- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
163- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
164- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_CLIENT_ID ), "rp-my" )
165- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_RESPONSE_TYPE ), "code" );
166- SettingsException exception = expectThrows (SettingsException .class , () -> {
167- new OpenIdConnectRealm (buildConfig (settingsBuilder .build ()), null , null );
168- });
169- assertThat (exception .getMessage (),
170- Matchers .containsString (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME )));
171- }
172-
173149 public void testMissingRedirectUriThrowsError () {
174150 final Settings .Builder settingsBuilder = Settings .builder ()
175151 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
176152 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
177153 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
178154 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
179- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
180155 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
181156 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_CLIENT_ID ), "rp-my" )
182157 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_RESPONSE_TYPE ), "code" );
@@ -192,7 +167,6 @@ public void testMissingClientIdThrowsError() {
192167 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
193168 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
194169 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
195- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
196170 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
197171 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
198172 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com" )
@@ -209,7 +183,6 @@ public void testMissingPrincipalClaimThrowsError() {
209183 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
210184 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
211185 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
212- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
213186 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
214187 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_REDIRECT_URI ), "https://rp.my.com/cb" )
215188 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .RP_CLIENT_ID ), "rp-my" )
@@ -228,7 +201,6 @@ public void testPatternWithoutSettingThrowsError() {
228201 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_AUTHORIZATION_ENDPOINT ), "https://op.example.com/login" )
229202 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_TOKEN_ENDPOINT ), "https://op.example.com/token" )
230203 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_ISSUER ), "https://op.example.com" )
231- .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_NAME ), "the op" )
232204 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .OP_JWKSET_PATH ), "https://op.example.com/jwks.json" )
233205 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .PRINCIPAL_CLAIM .getClaim ()), "sub" )
234206 .put (getFullSettingKey (REALM_NAME , OpenIdConnectRealmSettings .NAME_CLAIM .getPattern ()), "^(.*)$" )
0 commit comments