Class OIDCScopedStringAttributeTranscoder

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.attribute.transcoding.AbstractAttributeTranscoder<net.minidev.json.JSONObject>
net.shibboleth.oidc.attribute.transcoding.AbstractOIDCAttributeTranscoder
net.shibboleth.oidc.attribute.transcoding.impl.OIDCScopedStringAttributeTranscoder
All Implemented Interfaces:
net.shibboleth.idp.attribute.transcoding.AttributeTranscoder<net.minidev.json.JSONObject>, OIDCAttributeTranscoder, Component, DestructableComponent, InitializableComponent

public class OIDCScopedStringAttributeTranscoder extends AbstractOIDCAttributeTranscoder
Class encoding scoped string attributes to string json object. Name of the attribute will be set as the key. The string contains attribute value, delimiter and scope concatenated. If there are several attribute values they are delimited with delimiter(space is default) or placed to array.

For decoding, JSON Strings are split by the delimiter into a ScopedStringAttributeValue. For JSON Arrays, the elements are recessively visited and any JSON Strings are split by their delimiter into a list of ScopedStringAttributeValues.

  • Field Details

    • PROP_SCOPE_DELIMITER

      @Nonnull @NotEmpty public static final String PROP_SCOPE_DELIMITER
      Scope delimiter for combining the data.
      See Also:
    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
  • Constructor Details

    • OIDCScopedStringAttributeTranscoder

      public OIDCScopedStringAttributeTranscoder()
  • Method Details

    • encodeValues

      @Nullable protected Object encodeValues(@Nullable ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.attribute.IdPAttribute attribute, @Nonnull net.shibboleth.idp.attribute.transcoding.TranscodingRule rule) throws net.shibboleth.idp.attribute.AttributeEncodingException
      Specified by:
      encodeValues in class AbstractOIDCAttributeTranscoder
      Throws:
      net.shibboleth.idp.attribute.AttributeEncodingException
    • decodeValues

      @Nonnull @NonnullElements protected List<net.shibboleth.idp.attribute.IdPAttributeValue> decodeValues(@Nullable ProfileRequestContext profileRequestContext, @Nonnull Object input, @Nonnull net.shibboleth.idp.attribute.transcoding.TranscodingRule rule) throws net.shibboleth.idp.attribute.AttributeDecodingException
      Specified by:
      decodeValues in class AbstractOIDCAttributeTranscoder
      Throws:
      net.shibboleth.idp.attribute.AttributeDecodingException