Class PasswordPrincipalSerializer

  • All Implemented Interfaces:
    net.shibboleth.idp.authn.principal.PrincipalSerializer<String>, net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent

    @ThreadSafe
    public class PasswordPrincipalSerializer
    extends net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<String>
    Principal serializer for PasswordPrincipal that encrypts the password.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Pattern JSON_PATTERN
      Pattern used to determine if input is supported.
      private org.slf4j.Logger log
      Class logger.
      private javax.json.JsonBuilderFactory objectBuilderFactory
      JSON object bulder factory.
      private static String PASSWORD_FIELD
      Field name of password.
      private net.shibboleth.utilities.java.support.security.DataSealer sealer
      Data sealer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      net.shibboleth.idp.authn.principal.PasswordPrincipal deserialize​(String value)
      private javax.json.JsonArrayBuilder getJsonArrayBuilder()
      Get a JsonArrayBuilder in a thread-safe manner.
      private javax.json.JsonObjectBuilder getJsonObjectBuilder()
      Get a JsonObjectBuilder in a thread-safe manner.
      String serialize​(Principal principal)
      void setDataSealer​(net.shibboleth.utilities.java.support.security.DataSealer theSealer)
      Set the DataSealer to use.
      boolean supports​(String value)
      boolean supports​(Principal principal)
      • Methods inherited from class net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer

        getJsonGenerator, getJsonReader
      • Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent

        destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • PASSWORD_FIELD

        @Nonnull
        @NotEmpty
        private static final String PASSWORD_FIELD
        Field name of password.
        See Also:
        Constant Field Values
      • JSON_PATTERN

        private static final Pattern JSON_PATTERN
        Pattern used to determine if input is supported.
      • log

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

        @Nullable
        private net.shibboleth.utilities.java.support.security.DataSealer sealer
        Data sealer.
      • objectBuilderFactory

        @Nonnull
        private final javax.json.JsonBuilderFactory objectBuilderFactory
        JSON object bulder factory.
    • Constructor Detail

      • PasswordPrincipalSerializer

        public PasswordPrincipalSerializer()
        Constructor.
    • Method Detail

      • setDataSealer

        public void setDataSealer​(@Nullable
                                  net.shibboleth.utilities.java.support.security.DataSealer theSealer)
        Set the DataSealer to use.
        Parameters:
        theSealer - encrypting component to use
      • supports

        public boolean supports​(@Nonnull
                                Principal principal)
      • supports

        public boolean supports​(@Nonnull @NotEmpty
                                String value)
      • deserialize

        @Nullable
        public net.shibboleth.idp.authn.principal.PasswordPrincipal deserialize​(@Nonnull @NotEmpty
                                                                                String value)
                                                                         throws IOException
        Throws:
        IOException
      • getJsonObjectBuilder

        @Nonnull
        private javax.json.JsonObjectBuilder getJsonObjectBuilder()
        Get a JsonObjectBuilder in a thread-safe manner.
        Returns:
        an object builder
      • getJsonArrayBuilder

        @Nonnull
        private javax.json.JsonArrayBuilder getJsonArrayBuilder()
        Get a JsonArrayBuilder in a thread-safe manner.
        Returns:
        an array builder