Identity Manager将未经授权发送401

时间:2015-12-14 08:13:52

标签: thinktecture-ident-server identityserver3 thinktecture-ident-model thinktecture identity-management

我正在使用以下配置为我的Identity Manager,每次我通过我的访问令牌 - 它会抛出401(未经授权) app.Map(“/ admin”,adminApp => {

        var factory = new IdentityManagerServiceFactory();
        factory.ConfigureSimpleIdentityManagerService("AspId");

        var securityConfig = new ExternalBearerTokenConfiguration
        {
            Issuer = "https://localhost:44333/core",
            Audience = "https://localhost:44333/core/resources",
            Scope = "idmgr",
            SigningCert = Certificate.Get(),
        };

        adminApp.UseIdentityManager(new IdentityManagerOptions()
        {
            Factory = factory,
            SecurityConfiguration = securityConfig
        });
    });

我作为AUthorization Bearer看起来像

的传递令牌
{
"iss": "https://localhost:44333/core",
"aud": "https://localhost:44333/core/resources",
"exp": 1449995870,
"nbf": 1449995510,
"client_id": "roclient",
"scope": [
"email",
"idmgr",
"openid",
"phone",
"profile"
],
"sub": "58067d52-64bf-4447-a928-d3a1316bd677",
"auth_time": 1449995509,
"idp": "idsrv",
"role": [
"admin",
"IdentityManagerAdministrator"
],
"amr": [
"password"
]
}

这是我做得不对的事吗?

0 个答案:

没有答案
相关问题