Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

IdentityServer as an OAuth 2 Authorization Server for Azure API Management #895

Closed
digitalgym opened this issue Feb 9, 2015 · 1 comment

Comments

@digitalgym
Copy link

Im trying to configure Azure API Management to use IdentityServer as a Auth Server. I have a client configured to provide Authorization Code flow. When initiating authorisation I am able provide consent to access user profile. IdentityServer then redirects to the callback and I receive and error in Azure API management console.

Error: An error has occurred while authorizing access via foo: invalid_client

Client config

new Client
                {
                    ClientName = "Code Flow Client Demo",
                    Enabled = true,
                    ClientId = "codeclient",
                    ClientSecrets = new List<ClientSecret>
                    { 
                        new ClientSecret("secret".Sha256())
                    },
                    Flow = Flows.AuthorizationCode,
                    RequireConsent = true,
                    AllowRememberConsent = true,
                    ClientUri = "http://www.thinktecture.com",

                    RedirectUris = new List<string>
                    {
                        "https://foo.portal.azure-api.net/docs/services/54d8024eba147203543dd6b9/console/oauth2/authorizationcode/callback"
                    },
                    ScopeRestrictions = new List<string>
                    {
                        Constants.StandardScopes.OpenId,
                        Constants.StandardScopes.Profile,
                        Constants.StandardScopes.Email,
                        Constants.StandardScopes.OfflineAccess,
                        "read",
                        "write"
                    },
                    AccessTokenType = AccessTokenType.Reference,
                }
@leastprivilege
Copy link
Member

I never tried Azure API Management. You probably have to ask Microsoft.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants