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

本文标签: