Class MockSimpleStringTranscoder

  • All Implemented Interfaces:
    net.shibboleth.idp.attribute.transcoding.AttributeTranscoder<net.minidev.json.JSONObject>, net.shibboleth.oidc.attribute.transcoding.OIDCAttributeTranscoder, Component, DestructableComponent, InitializableComponent

    public class MockSimpleStringTranscoder
    extends net.shibboleth.oidc.attribute.transcoding.AbstractOIDCAttributeTranscoder
    Sample transcoder for tests which only supports simple strings.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class net.shibboleth.oidc.attribute.transcoding.AbstractOIDCAttributeTranscoder

        net.shibboleth.oidc.attribute.transcoding.AbstractOIDCAttributeTranscoder.NamingFunction
    • Field Summary

      • Fields inherited from interface net.shibboleth.oidc.attribute.transcoding.OIDCAttributeTranscoder

        PROP_ARRAY_AS_STRING, PROP_ASARRAY, PROP_ASBOOLEAN, PROP_ASINTEGER, PROP_BOOLEAN_AS_STRING, PROP_NAME, PROP_NUMBER_AS_STRING, PROP_STRING_DELIMITER
    • Constructor Detail

      • MockSimpleStringTranscoder

        public MockSimpleStringTranscoder()
    • Method Detail

      • encodeValues

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

        protected List<net.shibboleth.idp.attribute.IdPAttributeValue> decodeValues​(ProfileRequestContext profileRequestContext,
                                                                                    Object input,
                                                                                    net.shibboleth.idp.attribute.transcoding.TranscodingRule rule)
                                                                             throws net.shibboleth.idp.attribute.AttributeDecodingException
        Specified by:
        decodeValues in class net.shibboleth.oidc.attribute.transcoding.AbstractOIDCAttributeTranscoder
        Throws:
        net.shibboleth.idp.attribute.AttributeDecodingException
      • toJSONObject

        @Nonnull
        private Object toJSONObject​(@Nonnull @NotEmpty
                                    String value)
                             throws net.shibboleth.idp.attribute.AttributeEncodingException
        Throws:
        net.shibboleth.idp.attribute.AttributeEncodingException