Package de.xima.fc.pac4j
Class Pac4jProfileMapper
- java.lang.Object
-
- de.xima.fc.pac4j.Pac4jProfileMapper
-
public class Pac4jProfileMapper extends Object
- Since:
- 8.4.0
- Author:
- Norman Lorenz
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_CLIENT_NAME
static String
ATTR_PROFILE_ATTRIBUTES
static String
ATTR_PROFILE_ID
static String
ATTR_PROFILE_TYPE
-
Constructor Summary
Constructors Constructor Description Pac4jProfileMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.pac4j.core.profile.UserProfile
fromFastJson(com.alibaba.fastjson.JSONObject jsonObject)
Converts a given JSON object representation of a pac4j user profile back to apac4j user profile
.static com.alibaba.fastjson.JSONObject
toFastJson(org.pac4j.core.profile.UserProfile pac4jProfile)
Converts a givenpac4j user profile
to a JSON object representation.
-
-
-
Field Detail
-
ATTR_PROFILE_TYPE
public static final String ATTR_PROFILE_TYPE
- See Also:
- Constant Field Values
-
ATTR_PROFILE_ID
public static final String ATTR_PROFILE_ID
- See Also:
- Constant Field Values
-
ATTR_CLIENT_NAME
public static final String ATTR_CLIENT_NAME
- See Also:
- Constant Field Values
-
ATTR_PROFILE_ATTRIBUTES
public static final String ATTR_PROFILE_ATTRIBUTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
fromFastJson
public static org.pac4j.core.profile.UserProfile fromFastJson(com.alibaba.fastjson.JSONObject jsonObject)
Converts a given JSON object representation of a pac4j user profile back to apac4j user profile
. The JSON object is expected to contain the profile type, profile ID, client name, and raw profile attributes.- Parameters:
jsonObject
- the JSON object containing the profile information- Returns:
- a UserProfile instance created from the JSON data, or null if the input is null
-
toFastJson
public static com.alibaba.fastjson.JSONObject toFastJson(org.pac4j.core.profile.UserProfile pac4jProfile)
Converts a givenpac4j user profile
to a JSON object representation. The JSON object contains the profile type, profile ID, client name, and raw profile attributes.- Parameters:
pac4jProfile
- the pac4j user profile to convert- Returns:
- a JSON object containing the profile information, or null if the input is null
-
-