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

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

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

origin: cloudfoundry/uaa

protected KeyDescriptor getKeyDescriptor(UsageType type, KeyInfo key) {
  @SuppressWarnings("unchecked")
  SAMLObjectBuilder<KeyDescriptor> builder = (SAMLObjectBuilder<KeyDescriptor>) Configuration.getBuilderFactory()
      .getBuilder(KeyDescriptor.DEFAULT_ELEMENT_NAME);
  KeyDescriptor descriptor = builder.buildObject();
  descriptor.setUse(type);
  descriptor.setKeyInfo(key);
  return descriptor;
}
origin: apache/cloudstack

signKeyDescriptor.setUse(UsageType.SIGNING);
encKeyDescriptor.setUse(UsageType.ENCRYPTION);
origin: org.opensaml/opensaml

  /** {@inheritDoc} */
  protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException {
    KeyDescriptor keyDescriptor = (KeyDescriptor) samlObject;

    if (attribute.getName().equals(KeyDescriptor.USE_ATTRIB_NAME)) {
      try {
        UsageType usageType = UsageType.valueOf(UsageType.class, attribute.getValue().toUpperCase());
        // Only allow the enum values specified in the schema.
        if (usageType != UsageType.SIGNING && usageType != UsageType.ENCRYPTION) {
          throw new UnmarshallingException("Invalid key usage type: " + attribute.getValue());
        }
        keyDescriptor.setUse(usageType);
      } catch (IllegalArgumentException e) {
        throw new UnmarshallingException("Invalid key usage type: " + attribute.getValue());
      }
    }

    super.processAttribute(samlObject, attribute);
  }
}
origin: org.wso2.carbon.identity.metadata.saml2/org.wso2.carbon.identity.outbound.metadata.saml2

/**
 * Creates the key descriptor element with new key info each time called.
 *
 * @return KeyDescriptor with a new KeyInfo element.
 * @throws MetadataException
 */
private KeyDescriptor createKeyDescriptor() throws MetadataException {
  if (log.isDebugEnabled()) {
    log.debug("Creating the KeyDescriptor element");
  }
  KeyDescriptor keyDescriptor = BuilderUtil.createSAMLObject(ConfigElements.FED_METADATA_NS, "KeyDescriptor", "");
  keyDescriptor.setUse(UsageType.SIGNING);
  keyDescriptor.setKeyInfo(createKeyInfo());
  return keyDescriptor;
}
origin: org.springframework.security.extensions/spring-security-saml2-core

protected KeyDescriptor getKeyDescriptor(UsageType type, KeyInfo key) {
  SAMLObjectBuilder<KeyDescriptor> builder = (SAMLObjectBuilder<KeyDescriptor>) Configuration.getBuilderFactory().getBuilder(KeyDescriptor.DEFAULT_ELEMENT_NAME);
  KeyDescriptor descriptor = builder.buildObject();
  descriptor.setUse(type);
  descriptor.setKeyInfo(key);
  return descriptor;
}
origin: OpenConext/Mujina

encKeyDescriptor.setUse(UsageType.SIGNING);
origin: be.fedict.eid-idp/eid-idp-common-saml2

    KeyDescriptor.class, KeyDescriptor.DEFAULT_ELEMENT_NAME);
keyDescriptor.setKeyInfo(getKeyInfo(identity));
keyDescriptor.setUse(UsageType.SIGNING);
idpssoDescriptor.getKeyDescriptors().add(keyDescriptor);
org.opensaml.saml2.metadataKeyDescriptorsetUse

Javadoc

Sets the use of this key.

Popular methods of KeyDescriptor

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

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ImageIO (javax.imageio)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top plugins for WebStorm
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