Hi Sergey,

I always get 401 Unauthorized error, I have tried multiple combinations. All
fails at:
    if (getMessageContext().getSecurityContext().getUserPrincipal() == null)
{
            AuthorizationUtils.throwAuthorizationFailure(supportedSchemes,
realm);
        }


[cpandey@cpandey bin]$ curl -i -H "Authorization: Bearer
9bb34a4d98ad0b762aaadb8c07cbc97" http://0.0.0.0:8080/oauth/validate -H
"Content-Type:application/x-www-form-urlencoded" -X POST
HTTP/1.1 401 Unauthorized
Content-Length: 0
Date: Tue, 02 Aug 2016 04:22:00 GMT
Server: Jetty(8.1.17.v20150415)

Logs:
WebApplicationExceptionMapper    | 103 -
org.apache.cxf.cxf-rt-frontend-jaxrs - 3.0.4.redhat-621084 |
javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorizedn  |   at
org.apache.cxf.jaxrs.utils.SpecExceptions.toNotAuthorizedException(SpecExceptions.java:94)n
 
|       at
org.apache.cxf.jaxrs.utils.ExceptionUtils.toNotAuthorizedException(ExceptionUtils.java:134)n
 
|       at
org.apache.cxf.rs.security.oauth2.utils.AuthorizationUtils.throwAuthorizationFailure(AuthorizationUtils.java:111)n
 
|       at
org.apache.cxf.rs.security.oauth2.services.AccessTokenValidatorService.getTokenValidationInfo(AccessTokenValidatorService.java:40)

Please suggest. 



--
View this message in context: 
http://cxf.547215.n5.nabble.com/OAuth2-Implementation-tp5746401p5770932.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to