Class PrincipalRestUtils
- java.lang.Object
-
- org.forgerock.openam.forgerockrest.utils.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 Summary
Constructors Constructor Description PrincipalRestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetPrincipalNameFromServerContext(org.forgerock.services.context.Context context)Returns the authenticated principal associated with this context.static StringgetPrincipalNameFromSubject(Subject subject)Returns the authenticated principal associated with this subject.
-
-
-
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.
-
-