Skip to content

Commit ed47e1d

Browse files
committed
Moved the default encoding to a constant
1 parent bebad64 commit ed47e1d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/org/oidc/msg/RegistrationRequest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import java.util.Map;
77

88
public class RegistrationRequest extends AbstractMessage {
9+
10+
public static final String DEFAULT_ENC_VALUE = "A128CBC-HS256";
911

1012
{ // Set parameter requirements for message.
1113
paramVerDefs.put("redirect_uris", ParameterVerification.REQUIRED_LIST_OF_STRINGS.getValue());
@@ -92,7 +94,7 @@ public boolean verify() throws InvalidClaimException {
9294
String encParam = prefix + "_enc";
9395
if (getClaims().containsKey(algParam)) {
9496
if (!getClaims().containsKey(encParam)) {
95-
addClaim(encParam, "A128CBC-HS256");
97+
addClaim(encParam, DEFAULT_ENC_VALUE);
9698
}
9799
}
98100
if (getClaims().containsKey(encParam) && !getClaims().containsKey(algParam)) {

0 commit comments

Comments
 (0)