-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jans-auth-server): removed id_generation_endpoint and other clai…
…ms from discovery response #1827 docs: no docs required
- Loading branch information
Showing
7 changed files
with
104 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
jans-auth-server/server/src/test/java/io/jans/as/server/servlet/OpenIdConfigurationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package io.jans.as.server.servlet; | ||
|
||
import io.jans.as.model.configuration.AppConfiguration; | ||
import org.json.JSONObject; | ||
import org.testng.annotations.Test; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
import static org.testng.AssertJUnit.assertFalse; | ||
|
||
/** | ||
* @author Yuriy Z | ||
*/ | ||
public class OpenIdConfigurationTest { | ||
|
||
@Test | ||
public void filterOutKeys_whenKeyIsInDentiedList_mustRemoveThemFromJson() { | ||
AppConfiguration appConfiguration = new AppConfiguration(); | ||
appConfiguration.getDiscoveryDenyKeys().add("test"); | ||
|
||
JSONObject json = new JSONObject("{\"test\": 1}"); | ||
assertTrue(json.has("test")); | ||
|
||
OpenIdConfiguration.filterOutKeys(json, appConfiguration); | ||
assertFalse(json.has("test")); | ||
} | ||
|
||
@Test | ||
public void filterOutKeys_whenKeyIsNotInDentiedList_mustNotRemoveThemFromJson() { | ||
AppConfiguration appConfiguration = new AppConfiguration(); | ||
appConfiguration.getDiscoveryDenyKeys().add("testX"); | ||
|
||
JSONObject json = new JSONObject("{\"test\": 1}"); | ||
assertTrue(json.has("test")); | ||
|
||
OpenIdConfiguration.filterOutKeys(json, appConfiguration); | ||
assertTrue(json.has("test")); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters