-
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.
fix(jans-auth-server): generate description during built-in key rotat…
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 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
24 changes: 24 additions & 0 deletions
24
jans-auth-server/model/src/test/java/io/jans/as/model/jwk/AlgorithmTest.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,24 @@ | ||
package io.jans.as.model.jwk; | ||
|
||
import org.json.JSONObject; | ||
import org.testng.annotations.Test; | ||
|
||
import static org.testng.Assert.assertEquals; | ||
|
||
/** | ||
* @author Yuriy Zabrovarnyy | ||
*/ | ||
public class AlgorithmTest { | ||
|
||
@Test | ||
public void fill_whenCalled_shouldPutCorrectClaims() { | ||
JSONObject jsonObject = new JSONObject(); | ||
|
||
Algorithm.RS256.fill(jsonObject); | ||
|
||
assertEquals(Algorithm.RS256.getOutName(), jsonObject.getString("name")); | ||
assertEquals(Algorithm.RS256.getDescription(), jsonObject.getString("descr")); | ||
assertEquals(Algorithm.RS256.getUse().getParamName(), jsonObject.getString("use")); | ||
assertEquals(Algorithm.RS256.getParamName(), jsonObject.getString("alg")); | ||
} | ||
} |
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