integration of cognito with verified permissions

0

in verified permissions can we do authorization process using access token from cognito:groups users.i have done the matching with sub value but i need to do with cognito:groups for my requirement for multiple users.using id token i have done different matches but while using access token i have done only with the sub value.is there any methods to do the authorization process using access token for handling multiple users. the best practice of authorization process is with using access token so i need methods using with access token

jai
질문됨 6달 전324회 조회
2개 답변
0

Hi jai,
Using Cognito groups with IsAuthorizedWithToken() call is not yet supported. You have a couple of alternatives:

  • Switching to use isAuthorized() and manually verifying / unpacking token and then constructing principal portion of entity slice yourself
  • Using scope from access token as a way to match mulitple users
Maxim
답변함 6달 전
  • Hi maxim, i think each clientIds under we are creating the users, i have doubt to match the multiple users under a particular clientId giving some restrictions.How we can handle scope variable because all scope values are same for every users

  • can we add custom claims or modify instead of cognito groups in access token

0

Unfortunately the isAuthzWithToken API does not currently support groups.

I would recommend using the plain vanilla IsAuthorized API instead. In this scenario, you would translate the token to a user entity and pass the entity to the IsAuthz API. You can find sample code for translating the entity and sending it to AVP here

AWS
전문가
답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠