public class SimpleTokenUtils extends Object
Modifier and Type | Method and Description |
---|---|
static ECPublicKey |
decodeECPublicKey(String pemEncoded)
Decode a PEM encoded public key string to an EC PublicKey
|
static PrivateKey |
decodeJWKSPrivateKey(String jwksValue)
Decode a JWK(S) encoded private key string to an RSA PrivateKey
|
static RSAPublicKey |
decodeJWKSPublicKey(String jwksValue)
Decode a JWK(S) encoded public key string to an RSA PublicKey
|
static PrivateKey |
decodePrivateKey(String pemEncoded)
Decode a PEM encoded private key string to an RSA PrivateKey
|
static RSAPublicKey |
decodePublicKey(String pemEncoded)
Decode a PEM encoded public key string to an RSA PublicKey
|
static String |
readResource(String resName)
Read a classpath resource into a string and return it.
|
public static PrivateKey decodePrivateKey(String pemEncoded) throws Exception
pemEncoded
- - PEM string for private keyException
- on decode failurepublic static RSAPublicKey decodePublicKey(String pemEncoded) throws Exception
pemEncoded
- - PEM string for public keyException
- on decode failurepublic static ECPublicKey decodeECPublicKey(String pemEncoded) throws Exception
pemEncoded
- - PEM string for public keyException
- on decode failurepublic static RSAPublicKey decodeJWKSPublicKey(String jwksValue) throws Exception
jwksValue
- - JWKS string valueException
public static PrivateKey decodeJWKSPrivateKey(String jwksValue) throws Exception
jwksValue
- - JWKS string valueException
public static String readResource(String resName) throws IOException
resName
- - classpath resource nameIOException
- - on failureCopyright © 2017 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.