Class PrincipalRestUtils


  • public final class PrincipalRestUtils
    extends Object
    A collection of ForgeRock-REST based utility functions that do not rely on an application SSO token existing.
    Since:
    12.0.0
    • Constructor Detail

      • PrincipalRestUtils

        public PrincipalRestUtils()
    • Method Detail

      • getPrincipalNameFromServerContext

        public static String getPrincipalNameFromServerContext​(org.forgerock.services.context.Context context)
        Returns the authenticated principal associated with this context.
        Returns:
        the authenticated principal associated with this context, or null if not authenticated.
      • getPrincipalNameFromSubject

        public static String getPrincipalNameFromSubject​(Subject subject)
        Returns the authenticated principal associated with this subject.
        Returns:
        the authenticated principal associated with this subject, or null if not authenticated.