Class KeycloakKeyService
- java.lang.Object
-
- de.openknowledge.authentication.domain.token.KeycloakKeyService
-
public class KeycloakKeyService extends Object
-
-
Constructor Summary
Constructors Constructor Description KeycloakKeyService()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyPairgenerateKeyPair(KeycloakKeyConfiguration config)Generates a new key pair with the configured algorithm and writes it to the configured public and private key file names with must be available as resource from this class.static KeyPairreadKeyPair(KeycloakKeyConfiguration config)Read the key pair from the configured public and private key file names which must be available as resource from this class.
-
-
-
Method Detail
-
readKeyPair
public static KeyPair readKeyPair(KeycloakKeyConfiguration config)
Read the key pair from the configured public and private key file names which must be available as resource from this class.- Parameters:
config- - The key service configuration- Returns:
- The read key pair from the file system
-
generateKeyPair
public static KeyPair generateKeyPair(KeycloakKeyConfiguration config)
Generates a new key pair with the configured algorithm and writes it to the configured public and private key file names with must be available as resource from this class.- Parameters:
config- - The key service configuration- Returns:
- The new generated key pair
-
-