File tree Expand file tree Collapse file tree
src/main/java/io/fusionauth/domain Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ public boolean equals(Object o) {
127127
128128 @ JsonIgnore
129129 public String getDisplayName () {
130- if (algorithm == null ) {
130+ if (type == KeyType . Secret || algorithm == null ) {
131131 return name + " (" + type .name () + ")" ;
132132 }
133133
@@ -195,6 +195,10 @@ public boolean use(KeyUse use) {
195195 }
196196
197197 public KeyUse use () {
198+ // Secret keys are not used for signing or verification
199+ if (type == KeyType .Secret ) {
200+ return KeyUse .VerifyOnly ;
201+ }
198202 // If we have an algorithm and it is either HMAC or a key pair, then we can sign and verify.
199203 if (algorithm != null && (isPair () || type == KeyType .HMAC )) {
200204 return KeyUse .SignAndVerify ;
@@ -215,7 +219,8 @@ public enum KeyAlgorithm {
215219 RS256 ("SHA256withRSA" ),
216220 RS384 ("SHA384withRSA" ),
217221 RS512 ("SHA512withRSA" ),
218- Ed25519 ("Ed25519" );
222+ Ed25519 ("Ed25519" ),
223+ None ("None" );
219224
220225 public String algorithm ;
221226
@@ -232,7 +237,8 @@ public enum KeyType {
232237 EC ,
233238 RSA ,
234239 HMAC ,
235- OKP
240+ OKP ,
241+ Secret
236242 }
237243
238244 public static class CertificateInformation {
You can’t perform that action at this time.
0 commit comments