You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.
Hi,
I'm using the OAuth 2 CTP and so far it looks great - good job!
However, there is one issue I recently encountered. I've implemented my authentication server in a way similar to that of the sample. My authentication endpoint is very simple - it just reads the request and builds an appropriate response using AuthporizationServer. var tokenRequest = this.authorizationServer.ReadAccessTokenRequest();
var response = this.authorizationServer.PrepareAccessTokenResponse( tokenRequest, ResourceServerEncryptionPublicKey );
This approach has been working great with grant_type=authorization_code. But when I tested it with none (i.e. client credentials) or password (i.e. resource owner username and password) PrepareAccessTokenResponse throws an invalid cast exception. I've taken a look at the code of the method and it seems you cast the request object to ITokenCarryingRequest. However, only the AccessTokenAuthorizationCodeRequest type implements this interface, while the other two do not - AccessTokenClientCredentialsRequest and AccessTokenResourceOwnerPasswordCredentialsRequest.
I wanted to try and change the source code to see if implementing the interface will solve this, but I couldn't find it. Is it available anywhere?
The text was updated successfully, but these errors were encountered:
Thanks, I haven't used github before and didn't notice the branch list. I'll try to modify the code and post here if I succeeded at fixing this. Thanks again :)
I tried changing the code, but I cannot use the assembly I compiled. When I run the project that is using it I get a FileLoadException stating that "Strong name validation failed". I tried turning on and off signing the assembly and providing different key files, but nothing seems to work. Could you please provide me with some more information on how to build the project? Thanks!
It's alright, thanks!
We had to roll our own implementation for our scenario, but we may return to DotNetOpenAuth once it is released. It's a great project!
Regards,
Georgi
Hi,
I'm using the OAuth 2 CTP and so far it looks great - good job!
However, there is one issue I recently encountered. I've implemented my authentication server in a way similar to that of the sample. My authentication endpoint is very simple - it just reads the request and builds an appropriate response using AuthporizationServer.
var tokenRequest = this.authorizationServer.ReadAccessTokenRequest();
var response = this.authorizationServer.PrepareAccessTokenResponse( tokenRequest, ResourceServerEncryptionPublicKey );
This approach has been working great with grant_type=authorization_code. But when I tested it with none (i.e. client credentials) or password (i.e. resource owner username and password) PrepareAccessTokenResponse throws an invalid cast exception. I've taken a look at the code of the method and it seems you cast the request object to ITokenCarryingRequest. However, only the AccessTokenAuthorizationCodeRequest type implements this interface, while the other two do not - AccessTokenClientCredentialsRequest and AccessTokenResourceOwnerPasswordCredentialsRequest.
I wanted to try and change the source code to see if implementing the interface will solve this, but I couldn't find it. Is it available anywhere?
The text was updated successfully, but these errors were encountered: