/** * Get the path of the resource the represents the authenticated subject. * * @param securityContext The request's security context. * @return The path relative to the base URI. * @throws ScimException if an error occurs while resolving the path. */ protected String getAuthenticatedSubjectPath( final SecurityContext securityContext) throws ScimException { if(securityContext == null || securityContext.getUserPrincipal() == null) { throw new NotImplementedException("/Me not supported"); } return "Users/"+ securityContext.getUserPrincipal().toString(); }