Class Pac4jProfileMapper

java.lang.Object
de.xima.fc.pac4j.Pac4jProfileMapper

public final class Pac4jProfileMapper extends Object
Since:
8.4.0
Author:
Norman Lorenz
  • Field Details

  • 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 a pac4j 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 given pac4j 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