Class Pac4jProfileMapper
java.lang.Object
de.xima.fc.pac4j.Pac4jProfileMapper
- Since:
- 8.4.0
- Author:
- Norman Lorenz
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic org.pac4j.core.profile.UserProfilefromFastJson(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.JSONObjecttoFastJson(org.pac4j.core.profile.UserProfile pac4jProfile) Converts a givenpac4j user profileto a JSON object representation.
-
Field Details
-
ATTR_PROFILE_TYPE
- See Also:
-
ATTR_PROFILE_ID
- See Also:
-
ATTR_CLIENT_NAME
- See Also:
-
ATTR_PROFILE_ATTRIBUTES
- See Also:
-
-
Method Details
-
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 profileto 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
-