Package net.shibboleth.spring.security.credential

# Class AbstractBasicCredentialParser

java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser
net.shibboleth.spring.security.credential.AbstractCredentialParser
net.shibboleth.spring.security.credential.AbstractBasicCredentialParser

All Implemented Interfaces:
  `BeanDefinitionParser`

Direct Known Subclasses:
  `BasicInlineCredentialParser`, `BasicResourceCredentialParser`

public abstract class AbstractBasicCredentialParser extends AbstractCredentialParser
Specific parser for all BasicCredentials.

This does the work of putting the element values into strings. The bean factory then does the correct thing - with some help from Spring doing auto-conversion.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
log.
`static final QName`
`PRIVATE_KEY_ELEMENT_NAME`
<PrivateKey>.
`static final QName`
`PUBLIC_KEY_ELEMENT_NAME`
<PublicKey>.
`static final QName`
`SECRET_KEY_ELEMENT_NAME`
<SecretKey>.

### Fields inherited from class net.shibboleth.spring.security.credential.AbstractCredentialParser

`CREDENTIAL_ELEMENT_NAME, KEY_NAME_ELEMENT_NAME`

### Fields inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser

`CUSTOM_PARSER_PROPERTIES_LOCATION`

### Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

`ID_ATTRIBUTE, NAME_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`AbstractBasicCredentialParser()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)`
`private void`
`parsePrivateKey(List<Element> childElements, ParserContext parserContext, BeanDefinitionBuilder builder)`
Parse the <PrivateKey> element.
`private void`
`parsePublicKey(List<Element> childElements, ParserContext parserContext, BeanDefinitionBuilder builder)`
Parse the <PublicKey> elements.
`private void`
`parseSecretKey(List<Element> childElements, ParserContext parserContext, BeanDefinitionBuilder builder)`
Parse the <SecretKey> element.

### Methods inherited from class net.shibboleth.spring.security.credential.AbstractCredentialParser

`parseAttributes, parseKeyNames, resolveId`

### Methods inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser

`getCustomProperty, registerBeanDefinition`

### Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

`doParse, getBeanClass, getBeanClassName, getParentName, parseInternal`

### Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

`parse, postProcessComponentDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### PRIVATE_KEY_ELEMENT_NAME

@Nonnull public static final QName PRIVATE_KEY_ELEMENT_NAME
<PrivateKey>.

### PUBLIC_KEY_ELEMENT_NAME

@Nonnull public static final QName PUBLIC_KEY_ELEMENT_NAME
<PublicKey>.

### SECRET_KEY_ELEMENT_NAME

@Nonnull public static final QName SECRET_KEY_ELEMENT_NAME
<SecretKey>.

### log

@Nonnull private final org.slf4j.Logger log
log.

## Constructor Details

### AbstractBasicCredentialParser

public AbstractBasicCredentialParser()

## Method Details

### doParse

protected void doParse(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder)

Overrides:
  `doParse` in class `AbstractCredentialParser`

### parsePrivateKey

private void parsePrivateKey(@Nullable List<Element> childElements, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder)
Parse the <PrivateKey> element.

Parameters:
  `childElements` - the elements containing the private key, may be null or empty.
  `parserContext` - used for logging.
  `builder` - the builder.

### parsePublicKey

private void parsePublicKey(@Nullable List<Element> childElements, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder)
Parse the <PublicKey> elements.

Parameters:
  `childElements` - the elements containing the public key, must have exactly one element
  `parserContext` - used for logging.
  `builder` - the builder

### parseSecretKey

private void parseSecretKey(@Nullable List<Element> childElements, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder)
Parse the <SecretKey> element.

Parameters:
  `childElements` - the elements containing the private key, may be null or empty.
  `parserContext` - used for logging.
  `builder` - the builder