You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mule中JWT令牌验证问题:OAuth策略无法发送Authorization头

问题描述

我正尝试创建一个OAuth策略,使用JWT访问令牌保护API,该令牌需通过调用外部URL完成验证。我为Mule代理编写了如下RAML定义:

#%RAML 1.0
title: Custom API
version: 1
baseUri: http://localhost:8081
securitySchemes:
  oauth_2_0:
    description: |
      This API supports OAuth 2.0 for authenticating all API requests.
    type: OAuth 2.0
    describedBy:
      headers:
        authorization:
          description: |
            Used to send a valid OAuth 2 access token. Do not use with the "access_token" query string parameter.
          type: string
      responses:
        401:
          description: |
            Bad or expired token. This can happen if the user or the API revoked or expired an access token. To fix, you should re-authenticate the user.
        403:
          description: |
            Bad OAuth request (wrong consumer key, bad nonce, expired timestamp...). Unfortunately, re-authenticating the user won't help here.
/hello:
  get:
    securedBy: [oauth_2_0]

但在向外部服务验证令牌时,Mule无法发送Authorization请求头。

内容的提问来源于stack exchange,提问作者Ambika Prasad Das

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 09:27:16