All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openfact.keys.RsaKeyProvider Maven / Gradle / Ivy

There is a newer version: 1.1.3.Final
Show newest version
package org.openfact.keys;

import org.openfact.jose.jws.AlgorithmType;

import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.cert.X509Certificate;

public interface RsaKeyProvider extends KeyProvider {

    default AlgorithmType getType() {
        return AlgorithmType.RSA;
    }

    /**
     * Return the private key for the active keypair, or null if no active key is available.
     *
     * @return
     */
    PrivateKey getPrivateKey();

    /**
     * Return the public key for the specified kid, or null if the kid is unknown.
     *
     * @param kid
     * @return
     */
    PublicKey getPublicKey(String kid);

    /**
     * Return the certificate for the specified kid, or null if the kid is unknown.
     *
     * @param kid
     * @return
     */
    X509Certificate getCertificate(String kid);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy