Class AuthenticationResultPrincipalSerializer

  • 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 AuthenticationResultPrincipalSerializer
    extends net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<String>
    Principal serializer for AuthenticationResultPrincipal.
    • 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 PRINCIPAL_NAME_FIELD
      Field name of principal name.
      private org.opensaml.storage.StorageSerializer<net.shibboleth.idp.authn.AuthenticationResult> resultSerializer
      Circular reference back to the parent serializer.
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthenticationResultPrincipalSerializer​(org.opensaml.storage.StorageSerializer<net.shibboleth.idp.authn.AuthenticationResult> serializer)
      Constructor.
    • Field Detail

      • PRINCIPAL_NAME_FIELD

        @Nonnull
        @NotEmpty
        private static final String PRINCIPAL_NAME_FIELD
        Field name of principal name.
        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.
      • resultSerializer

        @Nonnull
        private final org.opensaml.storage.StorageSerializer<net.shibboleth.idp.authn.AuthenticationResult> resultSerializer
        Circular reference back to the parent serializer.
      • objectBuilderFactory

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

      • AuthenticationResultPrincipalSerializer

        public AuthenticationResultPrincipalSerializer​(@Nonnull
                                                       org.opensaml.storage.StorageSerializer<net.shibboleth.idp.authn.AuthenticationResult> serializer)
        Constructor.
        Parameters:
        serializer - serializer for the nested AuthenticationResult object
    • Method Detail

      • supports

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

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

        @Nullable
        public net.shibboleth.idp.authn.principal.AuthenticationResultPrincipal 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