@Override
    public ResponseEntity<String> build(final AuthenticationResult result,
                                        final HttpServletRequest request) throws Exception {
        return new ResponseEntity<>(MAPPER.writeValueAsString(result), HttpStatus.OK);
    }
This is {@link DefaultUserAuthenticationResourceEntityResponseFactory}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-rest-api/src/main/java/org/apereo/cas/rest/factory/DefaultUserAuthenticationResourceEntityResponseFactory.java