Class PasswordPrincipalSerializer
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<String>
-
- net.shibboleth.idp.authn.principal.impl.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 forPasswordPrincipalthat encrypts the password.
-
-
Field Summary
Fields Modifier and Type Field Description private static PatternJSON_PATTERNPattern used to determine if input is supported.private org.slf4j.LoggerlogClass logger.private javax.json.JsonBuilderFactoryobjectBuilderFactoryJSON object bulder factory.private static StringPASSWORD_FIELDField name of password.private net.shibboleth.utilities.java.support.security.DataSealersealerData sealer.
-
Constructor Summary
Constructors Constructor Description PasswordPrincipalSerializer()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.shibboleth.idp.authn.principal.PasswordPrincipaldeserialize(String value)private javax.json.JsonArrayBuildergetJsonArrayBuilder()Get aJsonArrayBuilderin a thread-safe manner.private javax.json.JsonObjectBuildergetJsonObjectBuilder()Get aJsonObjectBuilderin a thread-safe manner.Stringserialize(Principal principal)voidsetDataSealer(net.shibboleth.utilities.java.support.security.DataSealer theSealer)Set theDataSealerto use.booleansupports(String value)booleansupports(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
-
-
-
-
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.
-
-
Method Detail
-
setDataSealer
public void setDataSealer(@Nullable net.shibboleth.utilities.java.support.security.DataSealer theSealer)Set theDataSealerto use.- Parameters:
theSealer- encrypting component to use
-
supports
public boolean supports(@Nonnull Principal principal)
-
serialize
@Nonnull @NotEmpty public String serialize(@Nonnull Principal principal) throws IOException
- Throws:
IOException
-
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 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
-
-