Am 02.03.2013 15:17, schrieb inteloid: > Hi Thorsten, thanks for fast response. > > It throws Unauthorized exception, because there is no userSubjet, and there > shouldn't be one, because Client acts on behalf of itself. > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/OAuth2-Client-credentials-Get-Client-ID-tp5723951p5723953.html > Sent from the cxf-user mailing list archive at Nabble.com. You are right, I didn't think of that when implementing this class. The problem is that the method getContext checks the Subject.
You may want to provide a patch to handle this case. In the meantime you can use the following code: messagecontext.getContent(OAuthContext.class).getClientId();
