Package org.pac4j.core.profile
Class InternalAttributeHandler
- java.lang.Object
-
- org.pac4j.core.profile.InternalAttributeHandler
-
public class InternalAttributeHandler extends Object
Internally handles attributes (set / get).- Since:
- 2.0.0
- Author:
- Jerome Leleu
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
static String
PREFIX
static String
PREFIX_BOOLEAN
static String
PREFIX_DATE
static String
PREFIX_INT
static String
PREFIX_LONG
static String
PREFIX_SB64
static String
PREFIX_URI
-
Constructor Summary
Constructors Constructor Description InternalAttributeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaSerializationHelper
getSerializationHelper()
boolean
isStringify()
protected SimpleDateFormat
newSdf()
Object
prepare(Object value)
Before saving the attribute into the attributes map.Object
restore(Object value)
After retrieving the attribute from the attributes map.void
setSerializationHelper(JavaSerializationHelper serializationHelper)
void
setStringify(boolean stringify)
Define if we need to turn all attributes into strings, to properly work with CAS (regarding Kryo serialization or service ticket validation).String
toString()
-
-
-
Field Detail
-
logger
protected final transient org.slf4j.Logger logger
-
PREFIX
public static final transient String PREFIX
- See Also:
- Constant Field Values
-
PREFIX_BOOLEAN
public static final transient String PREFIX_BOOLEAN
- See Also:
- Constant Field Values
-
PREFIX_INT
public static final transient String PREFIX_INT
- See Also:
- Constant Field Values
-
PREFIX_LONG
public static final transient String PREFIX_LONG
- See Also:
- Constant Field Values
-
PREFIX_DATE
public static final transient String PREFIX_DATE
- See Also:
- Constant Field Values
-
PREFIX_URI
public static final transient String PREFIX_URI
- See Also:
- Constant Field Values
-
PREFIX_SB64
public static final transient String PREFIX_SB64
- See Also:
- Constant Field Values
-
-
Method Detail
-
prepare
public Object prepare(Object value)
Before saving the attribute into the attributes map.- Parameters:
value
- the original value- Returns:
- the prepared value
-
restore
public Object restore(Object value)
After retrieving the attribute from the attributes map.- Parameters:
value
- the retrieved value- Returns:
- the restored value
-
newSdf
protected SimpleDateFormat newSdf()
-
getSerializationHelper
public JavaSerializationHelper getSerializationHelper()
-
setSerializationHelper
public void setSerializationHelper(JavaSerializationHelper serializationHelper)
-
isStringify
public boolean isStringify()
-
setStringify
public void setStringify(boolean stringify)
Define if we need to turn all attributes into strings, to properly work with CAS (regarding Kryo serialization or service ticket validation).- Parameters:
stringify
- whether we need to turn all attributes into strings
-
-