Package net.shibboleth.idp.authn

# Class AbstractTemplateSearchDnResolver.EscapingReferenceInsertionEventHandler

java.lang.Object
net.shibboleth.idp.authn.AbstractTemplateSearchDnResolver.EscapingReferenceInsertionEventHandler

All Implemented Interfaces:
  `org.apache.velocity.app.event.EventHandler`, `org.apache.velocity.app.event.ReferenceInsertionEventHandler`

Enclosing class:
  AbstractTemplateSearchDnResolver

protected static class AbstractTemplateSearchDnResolver.EscapingReferenceInsertionEventHandler extends Object implements org.apache.velocity.app.event.ReferenceInsertionEventHandler
Escapes LDAP attribute values added to the template context.

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`EscapingReferenceInsertionEventHandler()`

## Method Summary

Modifier and Type
Method
Description
`private Object`
`encode(Object value)`
Returns `FilterTemplate.encodeValue(byte[])` if value is a string or byte array.
`Object`
`referenceInsert(org.apache.velocity.context.Context context, String reference, Object value)`

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

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

## Constructor Details

### EscapingReferenceInsertionEventHandler

protected EscapingReferenceInsertionEventHandler()

## Method Details

### referenceInsert

@Nullable public Object referenceInsert(org.apache.velocity.context.Context context, String reference, Object value)

Specified by:
  `referenceInsert` in interface `org.apache.velocity.app.event.ReferenceInsertionEventHandler`

### encode

@Nullable private Object encode(@Nullable Object value)
Returns `FilterTemplate.encodeValue(byte[])` if value is a string or byte array.

Parameters:
  `value` - to encode
Returns:
  encoded value