0

I have implemented an authorization server based on the sample and am receiving an access token in response to client credentials request. From my understanding this access token has a null username because it is not tied to a user.

I have implemented a resource server also based on the sample. When I try to validate the access token in my wcf server (resource server) in OAuthAuthorizationManager.VerifyOAuth2 I get an ArgumentNullException for username from

var error = resourceServer.VerifyAccess(httpRequestInfo, out result);

How can I modify OAuthAuthorizationManager to allow a null username?

Do I create a generic principal on the fly and assign it to the scope in the token. i.e. should I use

var error = resourceServer.VerifyAccess(httpRequestInfo, out userName, out scope);

instead?

Ian1971
  • 3,546
  • 7
  • 30
  • 57

1 Answers1

1

This is an issue with DotNetOpenAuth v4.0. v4.1 has this issue fixed. It's not released yet, but you can snag a copy from NuGet if you point it at this channel: http://teamcity.dotnetopenauth.net:82/guestAuth/app/nuget/v1/FeedService.svc

Andrew Arnott
  • 74,820
  • 24
  • 127
  • 163