Class UsernamePrincipalSerializer
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<String>
-
- net.shibboleth.idp.authn.principal.impl.UsernamePrincipalSerializer
-
- 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 UsernamePrincipalSerializer extends net.shibboleth.idp.authn.principal.AbstractPrincipalSerializer<String>
Principal serializer forUsernamePrincipal.
-
-
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 static StringUSERNAME_FIELDField name ofUsernamePrincipal.
-
Constructor Summary
Constructors Constructor Description UsernamePrincipalSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description net.shibboleth.idp.authn.principal.UsernamePrincipaldeserialize(String value)Stringserialize(Principal principal)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
-
USERNAME_FIELD
@Nonnull @NotEmpty private static final String USERNAME_FIELD
Field name ofUsernamePrincipal.- See Also:
- Constant Field Values
-
JSON_PATTERN
@Nonnull private static final Pattern JSON_PATTERN
Pattern used to determine if input is supported.
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
-
Method Detail
-
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.UsernamePrincipal deserialize(@Nonnull @NotEmpty String value) throws IOException- Throws:
IOException
-
-