feat: extracted ECDSA key pair loader
This commit is contained in:
+4
-2
@@ -20,6 +20,7 @@ package com.onixbyte.simplejwt.authzero;
|
||||
import com.onixbyte.devkit.utils.Base64Util;
|
||||
import com.onixbyte.guid.GuidCreator;
|
||||
import com.onixbyte.security.KeyLoader;
|
||||
import com.onixbyte.security.impl.EcKeyLoader;
|
||||
import com.onixbyte.simplejwt.TokenPayload;
|
||||
import com.onixbyte.simplejwt.TokenResolver;
|
||||
import com.onixbyte.simplejwt.annotations.ExcludeFromPayload;
|
||||
@@ -178,8 +179,9 @@ public class AuthzeroTokenResolver implements TokenResolver<DecodedJWT> {
|
||||
* @return the builder instance
|
||||
*/
|
||||
public Builder keyPair(String publicKey, String privateKey) {
|
||||
this.publicKey = KeyLoader.loadEcdsaPublicKey(publicKey);
|
||||
this.privateKey = KeyLoader.loadEcdsaPrivateKey(privateKey);
|
||||
var keyLoader = new EcKeyLoader();
|
||||
this.publicKey = keyLoader.loadPublicKey(publicKey);
|
||||
this.privateKey = keyLoader.loadPrivateKey(privateKey);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user