Class X500PrincipalSerializer
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<String>
net.shibboleth.idp.authn.principal.impl.X500PrincipalSerializer
- All Implemented Interfaces:
PrincipalSerializer<String>
,Component
,DestructableComponent
,InitializableComponent
Principal serializer for
X500Principal
.- Since:
- 4.1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(String value) Deserialize the supplied value.private javax.json.JsonArrayBuilder
Get aJsonArrayBuilder
in a thread-safe manner.private javax.json.JsonObjectBuilder
Get aJsonObjectBuilder
in a thread-safe manner.Serialize the supplied principal.boolean
Whether the supplied value can be deserialized.boolean
Whether the supplied principal can be serialized.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
X500_NAME_FIELD
Field name of X.500 name.- See Also:
-
JSON_PATTERN
Pattern used to determine if input is supported. -
log
@Nonnull private final org.slf4j.Logger logClass logger. -
objectBuilderFactory
@Nonnull private final javax.json.JsonBuilderFactory objectBuilderFactoryJSON object bulder factory.
-
-
Constructor Details
-
X500PrincipalSerializer
public X500PrincipalSerializer()Constructor.
-
-
Method Details
-
supports
Whether the supplied principal can be serialized.- Parameters:
principal
- to examine- Returns:
- whether principal can be serialized
-
serialize
Serialize the supplied principal.- Parameters:
principal
- to serialize- Returns:
- serialized value
- Throws:
IOException
- if an error occurs during serialization
-
supports
Whether the supplied value can be deserialized.- Parameters:
value
- to examine- Returns:
- whether value can be deserialized
-
deserialize
Deserialize the supplied value.- Parameters:
value
- to deserialize- Returns:
- principal
- Throws:
IOException
- if an error occurs during deserialization
-
getJsonObjectBuilder
@Nonnull private javax.json.JsonObjectBuilder getJsonObjectBuilder()Get aJsonObjectBuilder
in a thread-safe manner.- Returns:
- an object builder
-
getJsonArrayBuilder
@Nonnull private javax.json.JsonArrayBuilder getJsonArrayBuilder()Get aJsonArrayBuilder
in a thread-safe manner.- Returns:
- an array builder
-