예, 사용자 정의 기능을 사용하여 Azure Logic 앱에서 JWT 토큰을 해독 할 수 있습니다. 그러나 로직 앱은 내장 작업을 통해 기본적으로 JWT 토큰 디코딩을 지원하지 않습니다. 대신 Logic Apps의 문자열 조작 기능을 조합하여보다 복잡한 작업을 위해 Azure 기능과 통합하여이를 달성 할 수 있습니다.
접근 할 수있는 방법은 다음과 같습니다.
1. Split 및 Base64 Decode : Logic Apps의 내장 기능을 사용하여 JWT 토큰을 ''로 분할 할 수 있습니다. 문자 및 Base64는 각 부분을 디코딩합니다. 이것은 당신에게 json 줄로 헤더와 페이로드를 제공합니다. `split '함수를 사용하여 토큰을 부분으로 나눈 다음`base64tostring`을 적용하여 해독 할 수 있습니다 [1] [3].
2. PARSE JSON : 페이로드를 디코딩 한 후`JSON` 기능을 사용하여 로직 앱에서 작업 할 수있는 JSON 객체로 구문 분석 할 수 있습니다 [1].
3. Azure 함수를 통한 사용자 정의 기능 : JWT 토큰의 고급 처리 또는 검증이 필요한 경우 Azure 기능을 만드는 것을 고려하십시오. 이 기능은 디코딩 및 유효성 검사 로직을 처리 할 수 있으며 로직 앱에서 호출 할 수 있습니다. 이 접근법은 토큰의 서명을 검증하거나 다른 복잡한 작업을 수행 해야하는 경우 특히 유용합니다 [5].
4. 아동 로직 앱 : 또 다른 전략은 JWT 토큰을 구문 분석하도록 특별히 설계된 하위 로직 앱을 만드는 것입니다. 이 어린이 앱은 여러 로직 앱에서 재사용 될 수 있으므로 워크 플로우를보다 쉽게 관리하고 유지할 수 있습니다 [3].
사용자 정의 함수 또는 Azure 기능을 사용하면 추가 단계처럼 보일 수 있지만 로직 앱에서 JWT 토큰을 처리 할 수있는 유연성과 확장 성을 제공합니다.
인용 :
[1] https://stackoverflow.com/questions/54257879/how-to-decode-a-jwt-in-azure-logic-app
[2] https://adevait.com/laravel/implementing-jwt-authentication-in-laravel
[3] https://autosysops.com/blog/parse-jwt-tokens-in-azure-logic-apps
[4] https://www.criipto.com/blog/jwt-validation-guide
[5] https://www.reddit.com/r/azure/comments/u4alct/blog_parse_jwt_token_with_azure_logic_apps/
[6] https://auth0.com/blog/how-to-validate-jwt-dotnet/
[7] https://community.flutterflow.io/ask-the-community/post/custom-action-for-decoding-jwt-and-saving-info-in--in--preferences-zvlf9rxdy02epbd
[8] https://hasura.io/blog/best-practices of-using-jwt-with-graphql
[9] https://community.auth0.com/t/custom-client-side-custom-jwt-inputs/97936
[10] https://github.com/auth0/jwt-decode
[11] https://techcommunity.microsoft.com/blog/azuredevcommunityblog/part-4-secure-your-logic-app-using-api-management-8211-validate-jwt-access-restr/336802