Tabnine Logo
KeyDescriptor.getKeyInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
getKeyInfo
method
in
org.opensaml.saml2.metadata.KeyDescriptor

Best Java code snippets using org.opensaml.saml2.metadata.KeyDescriptor.getKeyInfo (Showing top 10 results out of 315)

origin: apache/cloudstack

if (kd.getUse() == UsageType.SIGNING) {
  try {
    idpMetadata.setSigningCertificate(KeyInfoHelper.getCertificates(kd.getKeyInfo()).get(0));
  } catch (CertificateException ignored) {
    s_logger.info("[ignored] encountered invalid certificate signing.", ignored);
    idpMetadata.setEncryptionCertificate(KeyInfoHelper.getCertificates(kd.getKeyInfo()).get(0));
  } catch (CertificateException ignored) {
    s_logger.info("[ignored] encountered invalid certificate encryption.", ignored);
    unspecifiedKey = KeyInfoHelper.getCertificates(kd.getKeyInfo()).get(0);
  } catch (CertificateException ignored) {
    s_logger.info("[ignored] encountered invalid certificate.", ignored);
origin: org.opensaml/opensaml

/**
 * Checks that KeyInfo is present.
 * 
 * @param keyDescriptor the key descriptor to validate
 * @throws ValidationException thrown if KeyInfo is not present
 */
protected void validateKeyInfo(KeyDescriptor keyDescriptor) throws ValidationException {
  if (keyDescriptor.getKeyInfo()==null) {
    throw new ValidationException("KeyInfo required");
  }
}

origin: coveo/saml-client

private static Stream<X509Data> getDatasWithCertificates(KeyDescriptor descriptor) {
 return descriptor
   .getKeyInfo()
   .getX509Datas()
   .stream()
   .filter(d -> d.getX509Certificates().size() > 0);
}
origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.inbound.metadata.saml2

private void  setX509Certificate(EntityDescriptor entityDescriptor,SPSSODescriptor spssoDescriptor, SAMLSSOServiceProviderDO samlssoServiceProviderDO){
  List<KeyDescriptor> descriptors = spssoDescriptor.getKeyDescriptors();
  if (descriptors != null && descriptors.size() > 0) {
    KeyDescriptor descriptor = descriptors.get(0);
    if (descriptor != null) {
      if (descriptor.getUse().toString().equals("SIGNING")) {
        try {
          samlssoServiceProviderDO.setX509Certificate(org.opensaml.xml.security.keyinfo.KeyInfoHelper.getCertificates(descriptor.getKeyInfo()).get(0));
          samlssoServiceProviderDO.setCertAlias(entityDescriptor.getEntityID());
        } catch (java.security.cert.CertificateException ex) {
          log.error("Error While setting Certificate and alias", ex);
        }catch(java.lang.Exception ex){
          log.error("Error While setting Certificate and alias", ex);
        }
      }
    }
  }
}
private void  setSigningAlgorithmUri(SPSSODescriptor spssoDescriptor, SAMLSSOServiceProviderDO samlssoServiceProviderDO){
origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.sp.metadata.saml2

private void setX509Certificate(EntityDescriptor entityDescriptor, SPSSODescriptor spssoDescriptor, SAMLSSOServiceProviderDO samlssoServiceProviderDO) {
  List<KeyDescriptor> descriptors = spssoDescriptor.getKeyDescriptors();
  if (descriptors != null && descriptors.size() > 0) {
    KeyDescriptor descriptor = descriptors.get(0);
    if (descriptor != null) {
      if (descriptor.getUse().toString().equals("SIGNING")) {
        try {
          samlssoServiceProviderDO.setX509Certificate(org.opensaml.xml.security.keyinfo.KeyInfoHelper.getCertificates(descriptor.getKeyInfo()).get(0));
          samlssoServiceProviderDO.setCertAlias(entityDescriptor.getEntityID());
        } catch (java.security.cert.CertificateException ex) {
          log.error("Error While setting Certificate and alias", ex);
        } catch (java.lang.Exception ex) {
          log.error("Error While setting Certificate and alias", ex);
        }
      }
    }
  }
}
origin: edu.internet2.middleware/shibboleth-common

if (keyDescriptor.getKeyInfo() != null) {
  trustedNames.addAll(getTrustedNames(keyDescriptor.getKeyInfo()));
origin: org.opensaml/opensaml

if (keyDescriptor.getKeyInfo() != null) {
  CriteriaSet critSet = new CriteriaSet();
  critSet.add(new KeyInfoCriteria(keyDescriptor.getKeyInfo()));
origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.outbound.metadata.saml2

try {
  String cert = null;
  if (descriptor.getKeyInfo() != null) {
    if (descriptor.getKeyInfo().getX509Datas() != null && descriptor.getKeyInfo().getX509Datas().size() > 0) {
      for (int k = 0; k < descriptor.getKeyInfo().getX509Datas().size(); k++) {
        if (descriptor.getKeyInfo().getX509Datas().get(k) != null) {
          if (descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates() != null &&
              descriptor.getKeyInfo().getX509Datas().get(0).getX509Certificates().size() > 0) {
            for (int y = 0; y < descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().size(); y++) {
              if (descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().get(y) != null) {
                if (descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().get(y).
                    getValue() != null && descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().
                    get(y).getValue().length() > 0) {
                  cert = descriptor.getKeyInfo().getX509Datas().get(k).getX509Certificates().get(y).
                      getValue().toString();
origin: org.adeptnet.auth/auth-saml

KeyInfo ki = kdesc.getKeyInfo();
if (ki == null) {
  continue;
origin: lastpass/saml-sdk-java

  continue;
KeyInfo ki = kdesc.getKeyInfo();
if (ki == null)
  continue;
org.opensaml.saml2.metadataKeyDescriptorgetKeyInfo

Javadoc

Gets information about the key, including the key itself.

Popular methods of KeyDescriptor

  • getUse
    Gets the use of this key.
  • setKeyInfo
    Sets information about the key, including the key itself.
  • setUse
    Sets the use of this key.
  • getEncryptionMethods
    Gets the encryption methods that are supported by the entity.
  • getParent

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • JOptionPane (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now