IdentityServer2
IdentityServer2 copied to clipboard
OAuthClient is returning a 405 Method Not Allowed
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: <mySecret>
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?