admin管理员组文章数量:1403455
I am trying to use it like this:
@Resolver(() => Category)
@UseGuards(AuthGuard,RoleGuard,ResourceGuard)
@Resource('category')
export class CategoryResolver {
constructor(private readonly categoryService: CategoryService) {}
@Roles({roles:['realm:admin']})
@Scopes('category:view')
@Query(() => CategoryListResponseDto)
}
But I am not able to pass the resource and scope policy I Evaluate the policy on the admin console and it is working fine also I've tested on postman with grant_type, response_mode, audience, permission with this url: protocol/openid-connect/token and I am getting the required resources with scopes.
I am stuck in the problem why @Scopes('category:view') is not woring maybe I am not getting the authorization object in the access token. I am using nest-keycloak-connect
I have tried alot solutions but didn't find anything
本文标签:
版权声明:本文标题:Keycloak ResourceGuard and @Scopes are not working even I have configured everything perfectly on the admin console - Stack Over 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744415460a2605171.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论