IdentityServer / IdentityServer2

[deprecated] Thinktecture IdentityServer is a light-weight security token service built with .NET 4.5, MVC 4, Web API and WCF.
Other
410 stars 291 forks source link

OAuthClient is returning a 405 Method Not Allowed #849

Open scossgrove opened 9 years ago

scossgrove commented 9 years ago

Hi,

I am trying to create a OAuthClient that uses the Identity Server as it's authenication source.

The problem I am having is that every time i try to contact it I am getting a 405 - Method Not Allowed exception.

I have setup a OAuth Client with the with the ClientID: DomainOAuth ClientSecret:

Things to note here is that none of the "Allow" options are check and there is no Redirect URI.

The following is the code I am using, extending the DotNetOpenAuth OAuthClient class:

public static readonly ServiceProviderDescription MyServiceDescription = new ServiceProviderDescription
    {

        RequestTokenEndpoint = new MessageReceivingEndpoint("https://idsrv.mydomain.com/issue/oauth2/token", HttpDeliveryMethods.GetRequest | HttpDeliveryMethods.AuthorizationHeaderRequest),
        UserAuthorizationEndpoint = new MessageReceivingEndpoint("https://idsrv.mydomain.com/issue/oauth2/authorize", HttpDeliveryMethods.GetRequest | HttpDeliveryMethods.AuthorizationHeaderRequest),
        AccessTokenEndpoint = new MessageReceivingEndpoint("https://idsrv.mydomain.com/issue/oauth2/token", HttpDeliveryMethods.GetRequest | HttpDeliveryMethods.AuthorizationHeaderRequest),
        TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { new PlaintextSigningBindingElement() }
    };

Can you please help?