Jason Wang created CXF-5402:
-------------------------------

             Summary: Cannot report customized error back from loginHandler to 
ResourceOwnerGrantHandler
                 Key: CXF-5402
                 URL: https://issues.apache.org/jira/browse/CXF-5402
             Project: CXF
          Issue Type: Improvement
          Components: JAX-RS Security
    Affects Versions: 2.7.7
            Reporter: Jason Wang


You can supply loginHander, like MylongHandler to GrantHandler (like 
ResourceOwnerGrantHandler), but there is no way to report back errors.
All customized error message will be dropped by those lines.

   try {
            subject = loginHandler.createSubject(ownerName, ownerPassword);
        } catch (Exception ex) { 
            throw new OAuthServiceException(OAuthConstants.INVALID_REQUEST);
        }

My suggestion would be to follow the AccessTokenService's example, which can 
support writeCustomErrors by setting the property and report back 
OauthServiceException(CustomerFault()).




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to