Class SAML2SPSessionSerializer
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.idp.session.AbstractSPSessionSerializer
net.shibboleth.idp.saml.session.impl.SAML2SPSessionSerializer
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,StorageSerializer<SPSession>
A serializer for
SAML2SPSession objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringField name of ACS location.private static final StringField name of Single Logout indicator.private static final StringField name of NameID.DOM configuration parameters used by LSSerializer to exclude XML declaration.private ParserPoolParser for NameID fields.private static final StringField name of SessionIndex. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SPSessiondoDeserialize(JsonObject obj, String id, Instant creation, Instant expiration) Implement this method to return the appropriate type of object, populated with the basic information supplied.protected voiddoSerializeAdditional(SPSession instance, JsonGenerator generator) Override this method to handle serialization of additional data.voidsetParserPool(ParserPool pool) Set theParserPoolto use.Methods inherited from class net.shibboleth.idp.session.AbstractSPSessionSerializer
deserialize, serializeMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
NAMEID_FIELD
Field name of NameID.- See Also:
-
SESSION_INDEX_FIELD
Field name of SessionIndex.- See Also:
-
ACS_LOC_FIELD
Field name of ACS location.- See Also:
-
LOGOUT_PROP_FIELD
Field name of Single Logout indicator.- See Also:
-
NO_XML_DECL_PARAMS
DOM configuration parameters used by LSSerializer to exclude XML declaration. -
parserPool
Parser for NameID fields.
-
-
Constructor Details
-
SAML2SPSessionSerializer
Constructor.- Parameters:
offset- time to subtract from record expiration to establish session expiration value
-
-
Method Details
-
doSerializeAdditional
Override this method to handle serialization of additional data.The serialization "context" is the continuation of a JSON struct.
- Overrides:
doSerializeAdditionalin classAbstractSPSessionSerializer- Parameters:
instance- object to serializegenerator- JSON generator to write to
-
doDeserialize
@Nonnull protected SPSession doDeserialize(@Nonnull JsonObject obj, @Nonnull @NotEmpty String id, @Nonnull Instant creation, @Nonnull Instant expiration) throws IOException Implement this method to return the appropriate type of object, populated with the basic information supplied.The JSON object supplied is a structure that may contain additional data created by the concrete subclass during serialization.
- Specified by:
doDeserializein classAbstractSPSessionSerializer- Parameters:
obj- JSON structure to parseid- the identifier of the service associated with this sessioncreation- creation time of sessionexpiration- expiration time of session- Returns:
- the newly constructed object
- Throws:
IOException- if an error occurs during deserialization