Class ServerCryptoProvider

java.lang.Object
io.jans.as.model.crypto.AbstractCryptoProvider
io.jans.as.server.service.ServerCryptoProvider

public class ServerCryptoProvider extends io.jans.as.model.crypto.AbstractCryptoProvider
Author:
Yuriy Zabrovarnyy
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServerCryptoProvider(io.jans.as.model.crypto.AbstractCryptoProvider cryptoProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    org.json.JSONObject
    generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime)
     
    org.json.JSONObject
    generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength)
     
    org.json.JSONObject
    generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength, io.jans.as.model.jwk.KeyOpsType keyOpsType)
     
    getKeyId(io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet, io.jans.as.model.jwk.Algorithm algorithm, io.jans.as.model.jwk.Use use, io.jans.as.model.jwk.KeyOpsType keyOps)
     
     
     
    sign(String signingInput, String keyId, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm)
     
    boolean
    verifySignature(String signingInput, String encodedSignature, String keyId, org.json.JSONObject jwks, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm)
     

    Methods inherited from class io.jans.as.model.crypto.AbstractCryptoProvider

    checkKeyExpiration, generateJwks, getKeyRegenerationIntervalInDays, getKeys, getPublicKey, setKeyRegenerationIntervalInDays

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerCryptoProvider

      public ServerCryptoProvider(io.jans.as.model.crypto.AbstractCryptoProvider cryptoProvider)
  • Method Details

    • getKeyId

      public String getKeyId(io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet, io.jans.as.model.jwk.Algorithm algorithm, io.jans.as.model.jwk.Use use, io.jans.as.model.jwk.KeyOpsType keyOps) throws io.jans.as.model.exception.CryptoProviderException
      Overrides:
      getKeyId in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • generateKey

      public org.json.JSONObject generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      generateKey in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • generateKey

      public org.json.JSONObject generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength, io.jans.as.model.jwk.KeyOpsType keyOpsType) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      generateKey in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • generateKey

      public org.json.JSONObject generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      generateKey in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • sign

      public String sign(String signingInput, String keyId, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      sign in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • verifySignature

      public boolean verifySignature(String signingInput, String encodedSignature, String keyId, org.json.JSONObject jwks, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      verifySignature in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • deleteKey

      public boolean deleteKey(String keyId) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      deleteKey in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • containsKey

      public boolean containsKey(String keyId)
      Specified by:
      containsKey in class io.jans.as.model.crypto.AbstractCryptoProvider
    • getPrivateKey

      public PrivateKey getPrivateKey(String keyId) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      getPrivateKey in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException
    • getPublicKey

      public PublicKey getPublicKey(String keyId) throws io.jans.as.model.exception.CryptoProviderException
      Specified by:
      getPublicKey in class io.jans.as.model.crypto.AbstractCryptoProvider
      Throws:
      io.jans.as.model.exception.CryptoProviderException