IdentityModel / AuthorizationServer

Sample implementation of an OAuth2 Authorization Server
Other
281 stars 136 forks source link

Integrate AuthorizationServer with IdentityServerV2.5 #242

Closed MehrdadKamelzadeh closed 9 years ago

MehrdadKamelzadeh commented 9 years ago

I have hosted both AS and IdSrv as you explained in the videos. the Idsrv is working fine.

I also added AS as a Relying Party in IdSrv. and changed the IdentityModel.service.config and autofac.config as following:

``` ``` ``` ``` ![thinktecture](https://cloud.githubusercontent.com/assets/5070404/5357938/69141fb2-7fc3-11e4-9272-9f6ca10ffa59.PNG) The problem is when I click on the AS "configuration server" button or "Application Permissions" nothing happens as shown in following images: ![think2](https://cloud.githubusercontent.com/assets/5070404/5357973/c6be1bea-7fc3-11e4-9508-18629f8c1bac.PNG) ![think3](https://cloud.githubusercontent.com/assets/5070404/5357975/cc16521a-7fc3-11e4-9cf9-512bc5ba672f.png) Would you please guide me how to integrate these two perfect software?
leastprivilege commented 9 years ago

There is no redirect URI configured for AS in IdSrv

MehrdadKamelzadeh commented 9 years ago

I think that was the problem. but now I get another error. if you help me out with that I really appreciate it.

"WIF10201: No valid key mapping found for securityToken: 'System.IdentityModel.Tokens.X509SecurityToken' and issuer: 'http://identityserver.v2.thinktecture.com/samples'."

think4

leastprivilege commented 9 years ago

That probably means that the certificate thumbprint or issuer name in your config is not correct.

One way to generate the config snippet is to use the VS2013 web project wizard (organizational accounts, on-premise). Then copy the relevant config over to AS.

MehrdadKamelzadeh commented 9 years ago

I found the problem which was adding "thumbprint" of IdSrv to identityModel.config in AS. just for the guys have the same problem, I simply copied the "Signing Thumbprint" to AS identityModel.Config:

think5

    <issuerNameRegistry type="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, System.IdentityModel.Tokens.ValidatingIssuerNameRegistry">
        <authority name="IdP">
            <keys>
                <add thumbprint="F597EAF6B1842E2B59B4D63A594B2CF207E0EE08" />
            </keys>
            <validIssuers>
                <add name="http://identityserver.v2.thinktecture.com/samples" />
            </validIssuers>
        </authority>
    </issuerNameRegistry>
leastprivilege commented 9 years ago

cool

MehrdadKamelzadeh commented 9 years ago

Yes Dominik. thank you very much for your help.