Class ProxyAuthenticationPrincipalSerializer
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<String>
net.shibboleth.idp.authn.principal.impl.ProxyAuthenticationPrincipalSerializer
- All Implemented Interfaces:
PrincipalSerializer<String>,Component,DestructableComponent,InitializableComponent
@ThreadSafe
public class ProxyAuthenticationPrincipalSerializer
extends AbstractPrincipalSerializer<String>
Principal serializer for
ProxyAuthenticationPrincipal.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final PatternPattern used to determine if input is supported.private final org.slf4j.LoggerClass logger.private final javax.json.JsonBuilderFactoryJSON object bulder factory.private static final StringField name of proxy audiences.private static final StringField name of authority content.private static final StringField name of proxy count. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(String value) Deserialize the supplied value.private javax.json.JsonArrayBuilderGet aJsonArrayBuilderin a thread-safe manner.private javax.json.JsonObjectBuilderGet aJsonObjectBuilderin a thread-safe manner.Serialize the supplied principal.booleanWhether the supplied value can be deserialized.booleanWhether the supplied principal can be serialized.Methods inherited from class net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer
getJsonGenerator, getJsonReaderMethods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
PROXY_AUTH_FIELD
Field name of authority content.- See Also:
-
PROXY_COUNT_FIELD
Field name of proxy count.- See Also:
-
PROXY_AUD_FIELD
Field name of proxy audiences.- 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
-
ProxyAuthenticationPrincipalSerializer
public ProxyAuthenticationPrincipalSerializer()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
@Nullable public ProxyAuthenticationPrincipal deserialize(@Nonnull @NotEmpty String value) throws IOException 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 aJsonObjectBuilderin a thread-safe manner.- Returns:
- an object builder
-
getJsonArrayBuilder
@Nonnull private javax.json.JsonArrayBuilder getJsonArrayBuilder()Get aJsonArrayBuilderin a thread-safe manner.- Returns:
- an array builder
-